Firelight Technologies FMOD Studio API
Studio::CommandReplay::setCreateInstanceCallback
Sets a callback that is invoked when the replay reaches a create event instance command.
C++ Syntax
FMOD_RESULT Studio::CommandReplay::setCreateInstanceCallback(
FMOD_STUDIO_COMMANDREPLAY_CREATE_INSTANCE_CALLBACK callback
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_SetCreateInstanceCallback(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
FMOD_STUDIO_COMMANDREPLAY_CREATE_INSTANCE_CALLBACK callback
);
C# Syntax
RESULT Studio.CommandReplay.setCreateInstanceCallback(
COMMANDREPLAY_CREATE_INSTANCE_CALLBACK callback
);
JavaScript Syntax
CommandReplay.setCreateInstanceCallback(
callback
);
Parameters
- callback
- The callback to use.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.
Remarks
The create instance bank callback is invoked whenever a Studio::EventDescription::createInstance command is reached.
If this callback is not set the event instance is created automatically. If the callback is set, it is up to the callback to either create a new instance or return without creating anything. If the instance is not created, then subsequent event instance calls will be ignored in the replay.
The callback contains the original handle that was created when the replay was recorded. This will not correspond to any valid object, but it can be used as a way of identifying different instances in the replay.
See Also
Version 1.10.03 Built on Feb 1, 2018