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.

0 votes
This is the scenario - lets say I have 100 events, and they are called in all different places across my Unity project.

When posting an event i use: AkSoundEngine.PostEvent(eventNameString, gameObject)

So I call the event with the name of the event, like "player_shoot_gun". Now lets say out of 200 places I post events from, I happened to spell the name of the event wrongly.

The error I get tells me the event ID - not helpful since I spelled the event name wrong, so its just a random number.

The error I get also tells me the name of the gameObject - only helpful if I can tell exactly what it is from that name. AKA If I had 100 prefabs of characters, and they each had a child gameObject called Sprite (or whatever), and thats the gameObject that the Event is attached to, I can't determine anything from just knowing the gameObject was called "Sprite".

Something similar to this just happened to me, and I basically had to find all references to "AkSoundEngine.PostEvent", and look through that huge list comparing every eventName string to my events. I eventually found the issue and fixed it.

I'm wondering how I could organize my project to avoid that tedious search in the future. Should I be routing all of my AkSoundEngine.PostEvent calls through some sort of 'Sound Manager' game object so I can add a Debug.Log line print the eventName string before it is played? Or is there some other way to get more info?

Thanks!

EDIT: Maybe worth noting, I was accidentally sending an empty string as the event name. Might be nice if there was a specific error or warning for that, rather than the generic "ID not found: 654231354"
in General Discussion by James M. (800 points)
edited by James M.

1 Answer

0 votes

Hey James, 

Thanks for your feedback!

You can definitely make a custom Sound Manager and you can also modify the Wwise Unity Integration scripts directly.
But don't you get a "Wwise: Failed posting event:" message when misspelling the event name? What version of the Wwise Unity Integration do you use? 

Also, did you consider using Wwise Types instead of manually typing in the name? That way, you would not be able to misspell the Event. 

Let us know how it goes!

 

by Mads Maretty S. (Audiokinetic) (40.1k points)
...