Build failed Unity 2019.2.8 on Switch, FMOD 2.00.05 (with workaround)

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)

Thanks

Are you using the latest versions of both the FMOD Unity base Integration package and the Unity Switch Integration package?

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.

It does look like this is a bug in the current release, we are working on a fix for the next release.

On a separate note, we currently build against SDK 8.3.0 which should only be a problem when it comes time to submit your game.

hey Cameron,

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).

cheers,

// greg

The next release is currently scheduled for the start of November, most likely around the 4th.

I’d recommend posting the cache issue separately, can you include the following:

  • FMOD & Unity versions
  • Log from the editor
  • Screenshot of the FMOD for Unity settings (from in the Unity editor)

hey Cameron,

thanks for the info. Yep, I’ll make another post for the cachesettings problem soon and add a link here for reference.

I’m running into this exact problem when building from Unity 2018.4.12f and Xcode 11.2, any additional information, timeline, workaround?