Before the Interhaptics Engine can render a haptic effect, the corresponding .haps file must be loaded into the engine. This requires the ability of the game engine to open and read the contents of the .haps file during runtime. It is recommended to treat .haps files as game assets, similar to sound effects and graphical assets.
To load a haptic effect from a .haps file, use the following Engine API call:
/// Adds the content of an .haps file to the Interhaptics Engine for future use.
/// JSON content of the .haps file to be loaded. Needs to follow Interhaptics .haps format.
/// ID of the haptic effect to be used in other engine calls. -1 if loading failed.
DLLExport int AddHM(const char* _content);