コミュニティQ&A

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

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

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

0 支持

Hi guys,

I have some questions regarding scene changes in Unity.

The first is: What is the best practice to ensure that sounds are being stopped when changing scene?
When I change scene, I often get the log message in the Wwise profiler that "Sound with positioning enabled is not attached to any listener, will use virtual voice setting."
And then if virtual voice settings is not kill, then it will not be stopped even though that the game object associated with that voice in Unity has actually been destroyed.

The second is: If I actually want some sound to continue across scene changes (without interruption) how do I do that?
Do I have to associate that sound with a separate listener, that is not destroyed on scene changes?

The third is: How do I handle loading/unloading of soundbanks when changing scene if the same sound bank is used in both scenes?
I understand that ideally you would not unload a sound bank on Destroy in the previous scene if you want to use it in the next one, but then you would need some bigger system keeping track on which sound banks are used in which scenes. And it seems that right now that if the bank is asked to be unloaded on Destroy in the previous scene and loaded on Awake or Start in the next scene, then the new load request will actually come before the bank is fully unloaded. This results in that Wwise will say that the bank is already loaded after which the bank will complete its unload request from the previous scene which in turn means that the bank is not loaded when the events using it are triggered. The funny thing is that Wwise will not say that the bank is already loaded in the new scene if I don't give it the unload request on Destroy in the previous one...

Sorry for this bulk of questions at the same time, but I feel that they are related and that it somehow makes sense to ask them together.

Best, Jakob

Jakob Hougaard Andersen (180 ポイント) General Discussion

回答 1

+1 支持

Hey Jakob,
I'll try to make it short. 

What is the best practice to ensure that sounds are being stopped when changing scene?
Make sure the SoundBank for that scene is stopped on Destroy and then all sounds related to that SoundBank should be stopped on destroy as well. But it sounds like you've got that covered. 

If I actually want some sound to continue across scene changes (without interruption) how do I do that?
- Have you checked out Media Relocation? As long as you've loaded a second SoundBank with that sound in it as well, you can just re-parent the game object you posted it on into the new scene, and it will continue playing despite unloading the first SoundBank. 

How do I handle loading/unloading of soundbanks when changing scene if the same sound bank is used in both scenes?
- I would probably have a new SoundBank for each scene instead of using one SoundBank for multiple, so that the audio is separated just like the game is structured. If you have to load the same SoundBank in a new scene, you might want to make a custom system that loads the SoundBanks and keeps track of them. Like a manager, that loads / unloads the SoundBanks, but only if it receives a new SoundBank request from a scene. 

Have you tried Wwise Adventure Game? If not, you should try download it from the Wwise Launcher and see if that method is anything that fits into your game. If it does fit, it's always a good reference sheet if you head into problems in your own game, or if you want to test something before you do the actual implementation in your game. 

Hope this helps! 

Mads Maretty S. (Audiokinetic) (40.2k ポイント)
Hi Mads
Thanks for your answer.
I will check out Wwise Adventure Game.
...