# Development Build with Unity build target UWP - Fmod initialzation failed

**URL:** <https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637>\
**Category:** Unity\
**Created:** [April 13, 2020, 5:33pm UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637 "2020-04-13T17:33:37Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![markuswehrle](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@markuswehrle](https://qa.fmod.com/u/markuswehrle)\
**Post date:** [April 13, 2020, 5:33pm UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637/1 "2020-04-13T17:33:37Z")

</div>

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:

> #elif (UNITY\_STANDALONE\_OSX || UNITY\_STANDALONE\_WIN)  
> public const string dll = “fmodstudio”;  
> #elif (DEVELOPMENT\_BUILD)  
> public const string dll = “fmodL”;  
> #else  
> public const string dll = “fmod”;  
> #endif

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!

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [April 21, 2020, 6:00am UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637/2 "2020-04-21T06:00:24Z")

</div>

What versions of FMOD and Unity are you using?

---

<div class="post-metadata">

**Author:** ![markuswehrle](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@markuswehrle](https://qa.fmod.com/u/markuswehrle)\
**Post date:** [April 21, 2020, 8:13am UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637/3 "2020-04-21T08:13:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [April 24, 2020, 6:38am UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637/4 "2020-04-24T06:38:35Z")

</div>

> [@markuswehrle](#):
>
> Searching for this issue using Google point me, that fmod.dll is used instead of fmodL.dll.

That is indeed the cause of the init failed error.

> [@markuswehrle](#):
>
> #elif (UNITY\_STANDALONE\_OSX || UNITY\_STANDALONE\_WIN)  
> public const string dll = “fmodstudio”;  
> #elif (DEVELOPMENT\_BUILD)  
> public const string dll = “fmodL”;  
> #else  
> public const string dll = “fmod”;  
> #endif

It may need something added before the `UNITY_STANDALONE_WIN` check:

```
#elif (UNITY_WSA && DEVELOPMENT_BUILD)
public const string dll = “fmodL”;

```

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

---

<div class="post-metadata">

**Author:** ![markuswehrle](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@markuswehrle](https://qa.fmod.com/u/markuswehrle)\
**Post date:** [May 1, 2020, 5:10pm UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637/5 "2020-05-01T17:10:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [May 5, 2020, 5:24am UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637/6 "2020-05-05T05:24:54Z")

</div>

It looks like the fmod\_studio.cs also needs the define added:

> #elif UNITY\_EDITOR || ((UNITY\_STANDALONE || **UNITY\_WSA** || UNITY\_ANDROID || UNITY\_XBOXONE || UNITY\_STADIA) && DEVELOPMENT\_BUILD)  
> public const string dll = “fmodstudioL”;  
> #else

---

<div class="post-metadata">

**Author:** ![markuswehrle](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@markuswehrle](https://qa.fmod.com/u/markuswehrle)\
**Post date:** [May 10, 2020, 5:56pm UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637/7 "2020-05-10T17:56:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [May 14, 2020, 6:29am UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637/8 "2020-05-14T06:29:57Z")

</div>

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:  
fmod.cs  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/7/7e3420438f5677ffe2f11911629d73b21a9e7fe4.png)

fmodstudio.cs

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/3/31a8d4743d156df92c9ab38fac22a4e55d8d95d6.png)

---

<div class="post-metadata">

**Author:** ![markuswehrle](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@markuswehrle](https://qa.fmod.com/u/markuswehrle)\
**Post date:** [May 15, 2020, 10:53am UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637/9 "2020-05-15T10:53:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Leks116](https://avatars.discourse-cdn.com/v4/letter/l/c77e96/32.png) [@Leks116](https://qa.fmod.com/u/Leks116)\
**Post date:** [September 26, 2021, 12:55am UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637/10 "2021-09-26T00:55:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [October 7, 2021, 4:57am UTC](https://qa.fmod.com/t/development-build-with-unity-build-target-uwp-fmod-initialzation-failed/15637/11 "2021-10-07T04:57:02Z")

</div>

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.
