Wwise and custom triggers
In case you are using the Wwise plugin in Unity, here is a tip I'm writing down for myself so I don't have to figure this out again.
If you want to make a custom trigger:
- subclass AkTriggerBase:
public class TriggerBlah : AkTriggerBase {
public void Play() {
if (triggerDelegate != null){
triggerDelegate(null);
}
}
}
-
add the trigger component you just made on any AkAmbient GameObject it's supposed to trigger
-
call
GetComponent<TriggerBlah>().Play()
when you want to trigger the sound.
That's all folks.