Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void PlayOneShotVolume(EventReference eventReference, float volume,
- Vector3 position = new Vector3())
- {
- try
- {
- PlayOneShotVolume(eventReference.Guid, volume, position);
- }
- catch (EventNotFoundException)
- {
- RuntimeUtils.DebugLogWarning("[FMOD] Event not found: " + eventReference);
- }
- }
- public static void PlayOneShotVolume(string path, float volume, Vector3 position = new Vector3())
- {
- try
- {
- PlayOneShotVolume(PathToGUID(path), volume, position);
- }
- catch (EventNotFoundException)
- {
- RuntimeUtils.DebugLogWarning("[FMOD] Event not found: " + path);
- }
- }
- public static void PlayOneShotVolume(FMOD.GUID guid, float volume, Vector3 position = new Vector3())
- {
- var instance = CreateInstance(guid);
- instance.set3DAttributes(RuntimeUtils.To3DAttributes(position));
- instance.setVolume(volume);
- instance.start();
- instance.release();
- }
- public static void PlayOneShotLabeledParam(EventReference eventReference, PARAMETER_ID id, string label,
- Vector3 position = new Vector3())
- {
- try
- {
- PlayOneShotLabeledParam(eventReference.Guid, id, label, position);
- }
- catch (EventNotFoundException)
- {
- RuntimeUtils.DebugLogWarning("[FMOD] Event not found: " + eventReference);
- }
- }
- public static void PlayOneShotLabeledParam(string path, PARAMETER_ID id, string label,
- Vector3 position = new Vector3())
- {
- try
- {
- PlayOneShotLabeledParam(PathToGUID(path), id, label, position);
- }
- catch (EventNotFoundException)
- {
- RuntimeUtils.DebugLogWarning("[FMOD] Event not found: " + path);
- }
- }
- public static void PlayOneShotLabeledParam(FMOD.GUID guid, PARAMETER_ID id, string label,
- Vector3 position = new Vector3())
- {
- var instance = CreateInstance(guid);
- instance.set3DAttributes(RuntimeUtils.To3DAttributes(position));
- instance.start();
- instance.setParameterByIDWithLabel(id, label);
- instance.release();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement