I’m trying to get Wwise and Unity 4.3 to work together. Basically, I followed the instructions in the Audiokinetic site:
-
download the Wwise integration (basically a plugin and bindings in Unity package format) and import into a new Unity project / scene.
-
Create an empty object to use as “sound engine” and add the AK initializer and terminator components to it.
-
Add the AK listener to my main camera (which follows the player - fps controller).
-
create a plane to walk on and a box collider set to trigger which attempts to trigger an event in a sound back using the following code:
void OnTriggerEnter() {
Debug.Log(“trigger”);
uint bankID;
AkSoundEngine.LoadBank(“testBank1.bnk”, AkSoundEngine.AK_DEFAULT_POOL_ID, out bankID);
AkSoundEngine.PostEvent(“testEvent”, this.gameObject);
} -
Obviously I created a Wwise project in the authoring tool, with a sound object and a play event with the appropriate name and generated the sound bank into the Unity Assets folder (StreamingAssets).
-
Finally, I set the AK scripts execution order as instructed in the Wwise site.
But even though the console shows wwise initializing just fine and I get no warnings, errors or any kind of complains, when the code triggers no sound comes out. Nada. Another interesting though possibly unrelated thing is, even though the Wwise documentation says the way to set the base sound bank path is thru a property in the AkGlobalSoundEngineInitializer
, setting this property does nothing: the base path seems actually hardcoded in the AkBankPath
script (sigh).
I haven’t tried reverting to Unity 4.2 to see if it’s a Unity 4.3 incompatibility issue yet. But I figured I’d ask in the meantime.