Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. Contact Sales if your project requires a support plan.

Unity - Clear Banks Request Received

+6 votes
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.
asked Jan 19 in General Discussion by Radoslav K. (390 points)
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 Answers

0 votes
Hello

I have exactly the same problem. did someone find the solution ?
answered Feb 4 by valentin b. (190 points)
No, I've tried new version of integration (2017.2.1.6524.980) but it's still the same.
0 votes
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.
answered Feb 5 by valentin b. (190 points)
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 vote
 
Best answer
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.
answered Feb 28 by Fabien B. (Audiokinetic) (9,980 points)
selected Feb 28 by Radoslav K.
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!
...