FMOD DLL Error on specific functions

On our standalone Mac build, most of FMOD’s functions are working without a hitch within the Unity’s engine. There are, however, a small set of functions that are throwing errors. We are currently on FMOD 1.06.07, and the error we’re receiving is this (trimmed a little so the file paths fit better into the question field).

DllNotFoundException: /Nevermind.app/Contents/Plugins/fmodstudio.bundle/Contents/MacOS/fmodstudio

at (wrapper managed-to-native) FMOD.Studio.Bus:FMOD_Studio_Bus_SetFaderLevel (intptr,single)

at FMOD.Studio.Bus.setFaderLevel (Single volume) [0x00000] in Assets\Plugins\FMOD\Wrapper\fmod_studio.cs:1663

As I said, the rest of the FMOD systems appear to be working. Events can be play, stopped, paused, and all such things. We’re even called other functions on the Studio.Bus objects. We can call FMOD.Studo.Bus.setPaused and no DLL error is thrown. However, if we call setFaderLevel, the error above appears. We were also experiencing this issue on Windows, for a time, but were able to fix it by moving the fmod.dll and the fmodstudio.dll out of Unity’s data folder and placing them next to the .exe.

Any assistance into this matter would be greatly apprecaited.

To provide more information. There is an error that comes earlier in the log file that I believe is symptomatic of the core issue we’re experiencing. The error is as follows:

Couldn't open Nevermind.app/Contents/Plugins/fmodstudio.bundle/Contents/MacOS/fmodstudio, error: dlopen(Nevermind.app/Contents/Plugins/fmodstudio.bundle/Contents/MacOS/fmodstudio, 2): Library not loaded: @rpath/libfmod.dylib
  Referenced from: /Nevermind.app/Contents/Plugins/fmodstudio.bundle/Contents/MacOS/fmodstudio
  Reason: image not found

What stage of the game does this happen in? Startup, level change, mid-way through gameplay?

This happens in two places during the game, though they are the two places we’re trying to set the bus fader level.

  1. On load, we use GetBus to get the three buses we created in FMOD: UI, SFX, Music. We then try to set the fader levels to the values we have saved in our options savefile. This is where the dllerror from the original message came from.
  2. We have audio sliders on our options menu. If the user tries to move those audio sliders on the Mac, they generate the same dllerror error as seen in the original message.
  3. The second error message I posted, my addendum comment, only happens at startup around the time we’re trying to set the fader values based off our saved data.

There is a bug in Unity where early in the first level start random (there may be a pattern but I can’t see it) native functions will throw DllNotFoundException. Once it happens that function will forever return DllNotFoundException.

Try removing the fader setting at startup, or try delaying it till first update.

This seems rather silly, but I imagine it’s a strange circumstance created partially by Unity. In any case, the proposed answer did solve the problem. Thank you very much.