Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Unity: How to check if Event exists before posting it?

+1 vote
Hello, here is my situation - I'm the programmer on my team and I'd like to be able to preemptively set up my code to post some Events that our Audio guy hasn't set up yet in Wwise.

If I post the event and it doesn't exist, it gives an error and stops/pauses the game (when running it in the Unity Editor).

Is there a recommended way to handle this? I figured I might be able to check if the Event exists before posting it, but I don't see an option for that (and maybe it would be slow to have to wait for Wwise to respond, so maybe that isn't the preferred method anyway?)

Or maybe there is a way to configure things so that it doesn't give an error when Wwise tries to play an Event that doesn't exist?

Thanks for any help!
asked Feb 2, 2021 in General Discussion by James M. (110 points)

1 Answer

0 votes
I've been looking for an answer to this as well. I'm currently calling PrepareEvent() and checking for success but there are obviously side effects to that since I may load a bank unexpectedly.
answered Nov 29, 2021 by Peter G. (150 points)