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. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Dynamically load language soundbanks in Unity

+2 votes
Hi all :)

Trying to support 2 languages in my app, English (US) and Danish using Wwise + Unity. I have voice over in both languages, and I've set up soundbanks so that all audio except for Voice Over goes into MAIN bank. The voice overs are instead built into VO bank. In the GeneratedSoundBanks folder, for each platform there's a sub-folder for each of the localizations, so one "Danish" folder and one "English (US)" each with a VO.bnk file. Example:

GeneratedSoundbanks/Windows/MAIN.bnk
GeneratedSoundbanks/Windows/Danish/VO.bnk
GeneratedSoundbanks/Windows/English (US)/VO.bnk

Unity Editor sees the generated MAIN and VO banks in its Wwise Picker window all fine, but at runtime it only loads MAIN, and won't load VO, reporting:

WwiseUnity: Bank VO failed to load (AK_FileNotFound)

I guess my question is, if I should make a script to move the correct VO bank from a sub-folder into the platform folder at runtime, and then load/unload the localized VO bank, or if there's already an Unity-Wwise method taking care of this?

And, is it possible to dynamically switch language with AkSoundEngine.SetCurrentLanguage(language string) under runtime, perhaps without having to unload a bank first? Ideally I would like to present the user an option to hot-swap language in a settings menu without having to restart the app or kill the background audio running.

Big thanks in advance :)
asked Aug 16, 2017 in General Discussion by Egil S. (990 points)

Please sign-in or register to answer this question.

...