Android Split Application Binary Issues


We’re currently experiencing issues with creating Android builds targeting an Oculus Quest device. Whenever we create a build with ‘Split Application Binary’ turned ON, FMOD will fail to find the Master Bus or any events for that matter.
This does not occur when this setting is turned off, where it all works correctly (as well as when running in editor).

  • When calling RuntimeManager.GetBus(‘bus:/MASTER’), it will give a FMODUnity.BusNotFoundException: [FMOD] Bus not found ‘bus:/MASTER’
  • RuntimeManager.getEventByID(’’) will also fail when inputting a correct GUID

We’re using Unity 2020.3.14f1 with FMOD Studio Unity Integration version 2.01.09. I’ve created a minimal repro-case, Unity project with only this unchanged FMOD Integration, with a test script which tries to load the bus and an event, with the Project settings we use in our development. Find it under my Profile uploads ‘FMODTestcase.rar’.
I install the package using ADB commands and then manually copy the OBB file to the correct location & naming on the Android device (‘Android/obb/com.DefaultCompany.FMODTest/’ in combination with installed package: ‘com.DefaultCompany.FMODTest.apk’).

Is there something I’m missing? Your help would be greatly appreciated.

The error you’ve described sounds similar to the problem outlined in the Platfrom Specifics section of the Unity Integration docs. By adding an async bank loading script to your scene I have run your reproduction with split binaries on an Android device.
Please let me know if that doesn’t work and I’ll investigate further.

Thank you, your earlier solution has worked for us. It seems to have been edited out in the reply, but I got a mail with the original solution which proposed a fix in the RuntimeManager (it waits for the bank load process before continuing), so we don’t have to go through the trouble of making the bank loading async and changing our startup sequence.

Would you mind sharing this solution?

If for some reason the documented solution doesn’t work for you, I have found that adding the following to Assets\FMOD\src\Runtime\RuntimeManager.cs at line 880 (in FMOD 2.01.09) inside LoadBank allows banks to be loaded from obbs

if (Settings.Instance.AndroidUseOBB)
    using (var www = new WWW(bankPath))
        while (!www.isDone) { }
        if (!String.IsNullOrEmpty(www.error))
            throw new BankLoadException(bankPath, www.error);
            LoadedBank loadedBank = new LoadedBank();
            FMOD.RESULT loadResult = Instance.studioSystem.loadBankMemory(www.bytes, FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out loadedBank.Bank);
            Instance.loadedBankRegister(loadedBank, bankPath, bankName, loadSamples, loadResult);