FMOD seems to be disabling required binaries during the build. When building and running my Unity project on android, I run into the following error message:
java.lang.UnsatisfiedLinkError: [...] couldn't find "libfmodL.so" [...] FMODUnity.RuntimeUtils.EnforceLibraryOrder () FMODUnity.RuntimeManager.get_Instance () FMODUnity.RuntimeManager.PathToGUID (System.String path) FMODUnity.RuntimeManager.GetEventDescription (System.String path) FMODUnity.StudioEventEmitter.Lookup () FMODUnity.StudioEventEmitter.Play () [...]
The mentioned library is indeed missing in the apk (as is libfmodstudioL.so). I traced this back to FMOD disabling the respective binary explicitly in Settings.SelectBinaries() before the build by calling (importer as PluginImporter).SetCompatibleWithPlatform(target, false);. I reenabled the binary, commented out the respective line so it would not be disabled and voilá, the exception disappears.
Now I wonder: What is the purpose of disabling these binaries and how come it happens with binaries that are apparently required? Is the problem with the libraries being disabled, or with them being required? The binaries are not very large, so does my workaround even have a downside?
I am using:
- Unity 2020.1.17f1
- FMOD 2.1.9 (plugin and studio)
- Target Architecture ARM64 (Oculus Quest 2)
- .NET Standard 2.0
- API level 26