Development Build with Unity build target UWP - Fmod initialzation failed

When build for UWP Plattform having Debugging and development build settings active FMOD initialization fails with error:

SystemNotInitializedException: [FMOD] Initialization failed : FMOD.Debug.Initialize : ERR_UNSUPPORTED

Build Command used:

BuildPipeline.BuildPlayer(Scenes, “Build/uwp”, BuildTarget.WSAPlayer, BuildOptions.CompressWithLz4HC | BuildOptions.Development | BuildOptions.AllowDebugging);

Searching for this issue using Google point me, that fmod.dll is used instead of fmodL.dll. I tried to fix this in the fmod.cs by adding an #elif for development build on line 38 like:

public const string dll = “fmodstudio”;
public const string dll = “fmodL”;
public const string dll = “fmod”;

It seems that it then uses (in my perspective the correct) fmodL.dll. But init still failes with issue ERR_INVALID HANDLE during FMOD.system.setOutput.

Searching in fmod.cs it seems that UWP or WSAPlayer is not handled specificly.
Non Development builds are working!

What versions of FMOD and Unity are you using?

FMOD 2.00.08, 64 Bit, build #108014
FMOD Unity Package 2.00.08
Unity 2019.03f6

That is indeed the cause of the init failed error.

It may need something added before the UNITY_STANDALONE_WIN check:

public const string dll = “fmodL”;

I have raised this as a bug to look into further.

I tried the suggested position to load the fmodL dll file.
But this still leads to the error:

SystemNotInitializedException: ERR_INVALID HANDLE during FMOD.system.setOutput.

It looks like the fmod_studio.cs also needs the define added:

public const string dll = “fmodstudioL”;

After implementing the suggested changes in fmod_studio.cs, a new error occurs

SystemNotInitializedException: [FMOD] Initialization failed: FMOD.Debug.Initialize : ERR_UNSUPPORTED : A command issued was not supported by this object. Possibly a plugin without certain callback specified.

That means that it is trying to call FMOD.Debug.Initialize (which is done in editor and development builds) while using the release libs, but it only exists in the logging libs.

These are the changes I have tested with so far:


I just double checked this, but it still shows SystemNotInitializedException: ERR_INVALID HANDLE during FMOD.system.setOutput.

For those who has this error, in VS try to set solution configuration as Release. For unknown reason it helped me

This problem should have been resolved in 2.00.10, if your version is later than that, can you please let me know what version of FMOD you are using?
For anyone still encountering this issue, updating to the latest FMOD integration version should fix it.