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
Hi, I'm trying use AkEvent to test a sound out in Edit Mode (aka without running the game), by simply pressing the "Play" button on the AkEvent.

I am testing this out in a fresh scene that only has the following:

1) WwiseGlobal gameobject (AkInitializer)
2) Camera with default AkListener
3) A gameobject with an AkBank set to load my SoundBank on Awake
4) A gameobject with an AkEvent

If I open the Scene and press "Play" on the AkEvent, no sound comes out (the "Play" button changes to "Stop" for what I imagine is the duration of the sound, and then back to "Play", but no audio comes out).

If I run the game in that scene (enter Play Mode), and press "Play" on the AkEvent, I can hear the sound fine.

If I then stop the game (exit Play Mode), and press "Play" on the AkEvent, I can still hear the sound then - but as soon as I switch scenes, or reload the current scene, the "Play" button no longer works until I run the game.

Nothing is changing the position of any of the gameobjects in the scene, so as far as I know it isn't that the AkEvent gameobject is making no sound because of attenuation (also, it works in Edit Mode AFTER I run the game and stop it).

Am I missing any settings? Are you guys able to test out your sounds without running the game first? I've googled this topic and read a couple posts on this forum, and I believe that it should be possible to hear the sounds without running the game first.

I'd gladly record a video showing the issue, if that would help. Our Wwise version in our unity project is:

Wwise Unity Integration Version Info:
Based on Wwise SDK: 2019.2.5 Build 7349
Unity Integration Bundle: 2019.2.5.1831
Unity Integration Version: 19

Thanks a lot for any help!
in General Discussion by James M. (800 points)
edited by James M.

1 Answer

0 votes
I'm not sure, but it might be related with a soundbank not being loaded. Awake is called in play mode (unless a script is marked as ExecuteAlways) so it isn't being loaded when you press that button.

There are 2 possible solutions in my mind:
1) either connect from wwise to unity for profiling & authoring (this should make wwise plays audio directly from its editor)
2) write a simple script that will load bank in editor mode - it should be pretty straightforward.
by nehvaleem (140 points)
Hey negvaleem, thanks for the response. Yeah, I'm hoping to not have to do #1, since what I'm trying to set up is just a casual way to test out SFX without running the scene, or doing any special setup (connecting to the wwise profiler).

I tried #2, and unfortunately it did not work. I've tried several combinations of things, and found other posts on this forum but nothing worked. I tried manually loading the SoundBank (AkBank's HandleEvent() as well as directly going to AK.Wwise.Bank and using Load()). None of it results in the AkEvent producing any sound, until I run the scene.

Would really love to have a way to set this up, if anyone has any other advice I'd super appreciate it. I can't think of anything I could possibly have set up incorrectly, and I'm fairly certain (based on some changelogs I've read from a while back) that I should be able to do this. Just not sure whats wrong!
...