コミュニティQ&A

Audiokineticのコミュニティ主導のQ&Aフォーラムへようこそ。ここはWwiseとStrataのユーザのみなさまがお互いに協力し合う場です。弊社チームによる直接のサポートをご希望の場合はサポートチケットページをご利用ください。バグを報告するには、Audiokinetic LauncherのBug Reportオプションをご利用ください。(Q&AフォーラムではBug Reportを受け付けておりませんのでご注意ください。専用のBug Reportシステムをご利用いただくことで、バグの報告が適切な担当部門に届き、修正される可能性が高まります。)

最適な回答を迅速に得られるよう、ご質問を投稿される際は以下のヒントをご参考ください。

  • 具体的に示す:何を達成したいのか、またはどんな問題に直面しているのかを具体的に示してください。
  • 重要な詳細情報を含める:Wwiseとゲームエンジンのバージョンやご利用のOSなど詳細情報を記載してください。
  • 試したことを説明する:すでに試してみたトラブルシューティングの手順を教えてください。
  • 事実に焦点を当てる:問題の技術的な事実を記載してください。問題に焦点を当てることで、ほかのユーザのみなさまが解決策を迅速に見つけやすくなります。

+8 支持

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.

Kimmo K. (400 ポイント) General Discussion
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

+1 支持
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!
Martín I. (170 ポイント)
...