I am using a box collider to trigger an event that is being emitted from a separate game object. The event is to play a Switch container, so I also attached AkSwitch to the game object. To play the event I am using my own script:
void OnTriggerEnter (Collider col)
{
if (col.tag == "Player")
{
GameObject go = GameObject.FindWithTag ("NPC");
go.GetComponent<splineMove> ().StartMove ();
AkSoundEngine.PostEvent ("tempVoicePlay", go);
}
I am getting a "No Valid Switch" error when running into the trigger. I know the banks and events are solid because it works when assigning AkEvent to the object instead (which doesn't work for me because the sound emitter is then the box instead of the NPC). Also, this script works when I change the event in Wwise to instead play a Random container. Is there something else I need to add to the script to make it recognize that the switch is indeed valid?
Thanks