Hi, I couldn’t build on Nintendo Switch with Unity 2019.2.8 & latest FMOD 2.00.05 (installed from the unity package)
The error is 2 functions not found at link time during the IL2CPP compilation.
I had to comment those functions in fmod_studio.cs: FMOD_Studio_Bus_GetCPUUsage and FMOD_Studio_EventInstance_GetCPUUsage.
I deleted+re-unpackaged everything from the plugin, deleted caches (/library, IL2CPP cache etc) but still had the error. Only commenting those functions in the code worked.
Extract from error log:
il2cpp_cache/4E5F75CFFF22399A0E8A48187CF905B9.o:Assembly-CSharp-firstpass1.cpp:function EventInstance_FMOD_Studio_EventInstance_GetCPUUsage_mADD422139A6AA27DD810EB8022D3A967F92C9802: error: undefined reference to ‘FMOD_Studio_EventInstance_GetCPUUsage’
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I double checked everything: only one Nintendo dev environment installed (the one for 2019.2.8, with SDK 9.3.0), Unity Editor Switch addon checked, Nintendo SDK package checked, FMOD package checked, FMOD Switch package checked. Re-cleaned everything & rebuilt all but still the same problem.
It’s strange because I can find (with text/hex editor) the name of the functions the linker does not find in the libfmodstudiounityplugin(L).a file.
Well, if no one else gets the same problem I guess it’s my setup. I’ll be extra careful for next FMOD/Unity update. I’ll update this post if I find anything that can be useful to other facing the same problem.
we’re seeing this error in v2.00.05 for Unity building for tvOS as well. Do you have an eta on when your next release with a fix might be?
Unrelated (should post this separately) but we seem to have to delete the FMODStudioCache manually frequently as the copy banks to StreamingAssets goes crazy and ends up with bad paths all over the place (on Mac).