Questions et réponses de la communauté

Bienvenue sur le forum de questions et réponses d'Audiokinetic, propulsé par la communauté. C'est l'endroit où les utilisateurs de Wwise et Strata s'entraident. Pour obtenir une aide directe de notre équipe, veuillez utiliser la page « Tickets de soutien ». Pour signaler un bug, utilisez l'option Bug Report dans l'Audiokinetic Launcher. (Veuillez noter que les rapports de bug soumis au forum questions-réponses seront rejetés. L'utilisation de notre système de rapport de bug dédié garantit que votre rapport est vu par les bonnes personnes et a les meilleures chances d'être corrigé.)

Pour obtenir rapidement les meilleures réponses, suivez ces conseils lorsque vous posez une question :

  • Soyez précis : qu'essayez-vous de réaliser ou quel est le problème spécifique que vous rencontrez ?
  • Pensez à inclure les détails importants : incluez des détails tels que les versions de Wwise et du moteur de jeu, le système d'exploitation, etc.
  • Expliquez ce que vous avez essayé de faire : indiquez aux autres les mesures que vous avez déjà prises pour essayer de résoudre le problème.
  • Concentrez-vous sur les faits : décrivez les aspects techniques de votre problème. Se concentrer sur le problème aide les autres personnes à trouver rapidement une solution.

+8 votes

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:

   AkSoundEngine.ClearBanks();
   AkBankManager.Reset();

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.

dans General Discussion par Kimmo K. (400 points)
Hi, I think we are dealing with same problem (my topic: https://www.audiokinetic.com/qa/4302/unity-clear-banks-request-received) someone suggested me how to fix it but I haven't figured it out yet.

1 Réponse

+1 vote
I'm having the exact same problem!
I have an AkBank component attached to a gameobject that only exists once in the entire game (with DontDestroyOnLoad and a singleton pattern) with Load On: Awake and Unload On: Nothing.

You're really precisely describing my problem here. I hope someone answers!
par Martín I. (170 points)
...