Wwise Unity integration 2017.2.1.6524.980
Unity 2017.3.0p4, both Windows and Mac Editors
We have some SoundBanks we'd like to load once and keep loaded. In Unity we implement this by having a Prefab named PersistingSoundBanks with the AkBanks with we want to keep loaded, and a GameInitialization script in every Scene that loads this Prefab once, marks the Instantiated PersistingSoundBanks as DontDestroyOnLoad and sets a static boolean that this once-only loading has been done and won't reoccur when changing Scenes.
- The Prefab named PersistingSoundBanks has AkBank with "Load On: Awake" and "Unload on: Nothing".
- PersistingSoundBanks is ensured to be loaded only once by GameInitialization manager object that exists in every Scene, but checks if the load-once has been done already.
- After we load a new Scene with "UnityEngine.SceneManager.LoadSceneAsync(sceneName)" and the new Scene activates, any Event to Play sounds that is associated with a sound bank we now trust to be loaded and persisting as such will crash with errors like "Could not post event ID "1377943714". Did you make sure to load the appropriate SoundBank?"
I think this is because WwiseGlobal object is automatically added to every Scene and has AkInitializer Component on it, that executes AkSoundEngineController.Init where it seems it will do the following every time AkInitializer.Awake runs, essentially for every Scene load:
If I understand correctly, AkInitializer is sabotaging our strategy of trying to keep SoundBanks persistently loaded which seems counter to SoundBank loading strategies manual would suggest to do in some cases.
So is this a bug in AkInitializer that ruins persisting SoundBanks by reinitializing at every Scene load?
Or is this a user error and should we not be using the Wwise default setting that adds the AkInitializer to every Scene, as AkInitializer/AkSoundEngineController is not supposed to support anything beyond a single demo/audio test room Scene without Scene transitions?
Our entire multi-Scene game is currently rigged with workarounds to load all SoundBanks again and again; any feedback, help, tips, affirmations and/or suggestions are welcome.