在 Audiokinetic 社区问答论坛上,用户可对 Wwise 和 Strata 相关问题进行提问和解答。如需从 Audiokinetic 技术支持团队获取答复,请务必使用技术支持申请单页面。

Unity - Clear Banks Request Received

+7 投票
Hello,

I have a problem with Wwise 2017.2 integration in my Unity project (v. 2017.3.0f3). Every time the scene changes, Wwise clears all my loaded banks including Init ( Line from profiler: "Clear Banks Request Received (from )") and then all the banks unload. It didn't happen in earlier versions of Unity integration. I used to unload old bank and load new one when new scene got loaded (using a code). The problem is that I have one sound bank that should be loaded permanently but as I said, it gets unloaded every time I go from one scene to another. I have tried to find what causes this for few days without any result so far.

Thanks for response.
最新提问 1月 19, 2018 分类:General Discussion | 用户: Radek Karnik (990 分)
I'm having the same problem, only with Unity 5.6.3f1. Hope someone figures out what's happening here. Didn't have this behavior until I upgraded to Wwise 2017.2
I'm having similar problems in Unity 2017.3.0p4 and Wwise 2017.2.1.6524.980.

It seems that WwiseGlobal object and its AkInitializer Component are in every Scene, and reinitializes the full sound engine, which also clears all banks making it impossible to maintain a persistent, load-only-once SoundBank.

I think there's a bug, since I don't believe the AkInitializer should always reinitialize even during Editor, since now it simply breaks any testability in our game in a multi-level game as we need to be able to move from Scene to Scene. Wwise Help even has instructions on how to manage SoundBanks and multiple strategies mention loading certain SoundBanks only once as a recommended workflow.
If you want to live dangerously, you can edit the AkInitializer.cs code so that it will only initialize once. Just add a private static bool to keep track if it's initialized, then check that before the call to AkSoundEngineController.Init is executed, and only call it if the boolean hasn't been set, then set it to mark you have already initialized.

However this is a bad idea, since I really don't know everything AkInitializer is running the repeated init calls for, and it could be counter to some Wwise requirements and create more and more problems elsewhere - this is why I reverted all my changes to the class, to make sure I didn't break more stuff elsewhere, since we were still getting multiple issues across the whole project, and am now looking for help on this Q&A forum to get a proper solution.

3 个回答

0 投票
Hello

I have exactly the same problem. did someone find the solution ?
最新回答 2月 4, 2018 用户: valentin b. (190 分)
No, I've tried new version of integration (2017.2.1.6524.980) but it's still the same.
0 投票
I found a solution that worked for me. I just deleted the Ak Initializer script and re-import it. That trick fixed the problem for me.

Hope that will be useful for someone else.
最新回答 2月 5, 2018 用户: valentin b. (190 分)
Thank you for reply, I am glad it works for you. Could you just specify where should I reimport that script from? (I suppose you deleted it from **\Assets\Wwise\Deployment\Components folder.)
+1 投票
 
已采纳
Hello ! We are aware of the problem, this will be fixed in 2017.2.2 that is scheduled to come out in a couple of days. Its tracked with issue number WG-36827.
最新回答 2月 28, 2018 用户: Fabien B. (Audiokinetic) (12,860 分)
采纳于 2月 28, 2018 用户:Radek Karnik
Hi there - I am using Unity 2017.3.0p2 with WWise integration 2017.2.2.6553.1015.

I have a music switch container which plays one theme when the state is Menu, and transitions to another theme when the state is Setup. I have successfully tested this in WWise.

These two states are across two scenes however, Menu is in the launcher game scene, and Setup is in the main game scene.

My music abruptly stops upon the second scene being loaded in Unity, and never begins to transition. I looked at the profiler and am seeing the same issue as in this thread in the profiler when the scene change happens:

'Bank unload request received (from main)'
'Bank unloaded (from main)'

Only started using WWise three days ago, so any help at all would be appreciated!
...