I just switched to the new version of FMOD from the 1.06 one.
It works perfectly on Android builds and in the Unity Editor, but on Windows builds I get the error “DllNotFoundException: …/Plugins/fmodstudiol.dll” every time I try to play a sound. I manually checked the build and the .dll files are there in the path specified in the error msg.
I tried “reinstaling” FMOD multiple times, tried to manually copy the .dll files from the unity project to the Windows build folder. Tried if there is an issue with 32/64 bit builds. Nothing so far fixed the problem.
Any idea what might be causing this issue?
The sound designer works on OSX and I use Windows. Might there be a problem with .banks being build on OSX and then used on Windows?
Continued trying out different things.
Found out that the windows build actually works, but only when you turn on “development build” AND “script debugging” in the Build Settings… Really strange behavior, but maybe it gives you a clue what might be happening.
Although you say it would be fixed with 1.07.04 I still experience the same issue with a development build of my game using the specified version (and Unity 5.3.1).
FMOD keeps printing the exception to the debug console (which makes it useless to see any other exception messages).
The source of StudioEventEmitter.cs looks the same (on Start and Update methods) to me.
Running in Editor does so without any problems, and so far no crashes occur in non-dev builds (but I can’t check if any exception occur as none are printed).
So it seems to me that there is a bit more to this issue than a few lines of code.
Would be great if someone could get into this again.
Addendum: I’ve tested a few build options variations (dev-build, script debug, auto-connect profiler) and so far the exception is thrown only when I have dev-build and auto connect profiler switched on. As soon as I check script debugging it does not occure anymore. I’m not sure what the script debugging does or changes to an build but it keeps the console clean ^^).
So in case you experience the same issue, you might consider checking script debugging on the build settings =).
This is all trying to work around a Unity bug that I’ve reported but has been ignored by Unity. Tobias - you say you still get DllNotFound in StudioEventEmitter.Start - but my changes in 1.07.04 remove all FMOD calls from Start. What code in Start() is generating the exception?
Same problem here.
The game works fine on the unity editor but on the windows build we get the error “DllNotFoundException:…/Plugins/fmodstudiol.dll”.
The error appears randomly: sometimes at startup, sometimes it’s possible to play for a while without any problem.
Everything works fine if we turn on “script debugging” on the build settings.
We are using FMOD 1.07.06 and unity 5.3.2.
I’ve been getting the exact same issue, however I found a fix by switching my build to x86 only rather than x86_64. I’m running Unity 5.3.1p4 FMOD 1.07.06. Sorry to not be more helpful, although this might help narrow down the issue.
We’ve made more tests.
Every build that we make has the same problems (if “script debugging” is turned off) but the error does not seem to be random.
We’ve noticed that the crash is caused by FMOD.Studio.EventInstance.stop or FMOD.Studio.ParameterInstance.setValue but the game does not crash at the first stop or setParam but the error seems related to particular sequences of events and we are able to reproduce it every time.
There is no concept of “FMOD Ready” for us to expose. There have been a few legitimate bugs in FMOD Integration script that caused this error in the past, but there are also Unity bugs - otherwise why would one function contained in fmodstudio.dll work than calling a second function in the same DLL fail?
Can you clarify: Your Integration version, your Unity version, what build settings you use on your standalone builds.
FMOD Studio 1.07.7, Unity 5.3.1f1, targeting Windows x64 with Dev Build set. I have not tried with Autoconnect Profiler or Script Debugging checked, as the results of those settings are already reported above. But if it helps, I can report back with my own findings for these settings…