Hello everyone, I’ve been struggling to find a solution to this for the last few days but I couldn’t find anything.
My app works on iOS, in the Editor and on Android. However, on Android LogCat throws an error that the app cannot load Wwise’s sound banks. Can’t load the Init bank and from there none of the other ones.
AK Error:
Bank Load Failed Name: 1355168291AK Error: File Init.bnk not found in path(s): /storage/emulated/0/Android/data/com.Company.App/files/DecodedBanks/English(US)/Init.bnk; /storage/emulated/0/Android/data/com.Company.App
WwiseUnity: Failed load Init.bnk with result: AK_FileNotFound
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
AkBankManager:LoadInitBank(Boolean)
AkSoundEngineInitialization:InitializeSoundEngine()
AkInitializer:OnEnable()
In Android Studio I can see that the banks are in /assets/Audio I also tried to put them in /assets/Audio/Android/ that didn’t work.
I read somewhere that Android has changed its storage policies recently and I can see from the error that the init bank is not in the right directory. However, I cannot manually move the file into /storage/emulated/0/Android/data/... because I don’t have permission to do so.
I expect that when building for Android the build process will take care and put the banks in their proper folders.
Also, in Wwise Initialization settings, in Unity, I have the Common User Settings set to Audio and in the Wwise Editor the SoundBanks path to Audio.
I also tried adding the following code
#if UNITY_ANDROID
AkSoundEngine.SetBasePath("assets/Audio/");
OR
AkSoundEngine.SetBasePath(Application.streamingAssetsPath + "/Audio/");
#endif
Debug.Log("Base path set to: " + Application.streamingAssetsPath + "/Audio/");
AkBankManager.LoadBank("SFX", true, false); // Fails again
Debug.Log("Attempting to load bank: SFX.bnk");
Can anyone help me figure out how to load the banks for Android?