Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. 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?

+2 votes
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. (120 points)

1 Answer

+1 vote
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. (170 points)
...