# (Unity) DllNotFoundException: fmodstudioL when calling FMOD.Memory.GetStats

**URL:** <https://qa.fmod.com/t/unity-dllnotfoundexception-fmodstudiol-when-calling-fmod-memory-getstats/17539>\
**Category:** Unity\
**Tags:** unity\
**Created:** [August 6, 2021, 6:02pm UTC](https://qa.fmod.com/t/unity-dllnotfoundexception-fmodstudiol-when-calling-fmod-memory-getstats/17539 "2021-08-06T18:02:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_eternal](https://avatars.discourse-cdn.com/v4/letter/_/ea5d25/32.png) [@\_eternal](https://qa.fmod.com/u/_eternal)\
**Post date:** [August 6, 2021, 6:02pm UTC](https://qa.fmod.com/t/unity-dllnotfoundexception-fmodstudiol-when-calling-fmod-memory-getstats/17539/1 "2021-08-06T18:02:23Z")

</div>

I’ve never seen this error in the editor before, but I ran into it when making a build. The error message appears as soon as the game is launched.

```auto
DllNotFoundException: fmodstudioL
FMOD.Memory.GetStats (System.Int32& currentalloced, System.Int32& maxalloced, System.Boolean blocking) (at C:/gamedev/unity/monospaced-lovers/Assets/Plugins/FMOD/src/Runtime/wrapper/fmod.cs:890)
FMODUnity.RuntimeUtils.EnforceLibraryOrder () (at C:/gamedev/unity/monospaced-lovers/Assets/Plugins/FMOD/src/Runtime/RuntimeUtils.cs:365)
FMODUnity.StudioListener.OnEnable () (at C:/gamedev/unity/monospaced-lovers/Assets/Plugins/FMOD/src/Runtime/StudioListener.cs:17)

```

My situation is pretty much the same as these two threads:

> [@DllNotFoundException: fmodstudioL](https://qa.fmod.com/t/dllnotfoundexception-fmodstudiol/15792):
>
> It works fine in Editor, but in build it crashes with this exception log. fmodstudioL dll is located in FMOD/lib/win/x86\_64 folder. What is the problem?[image]

> [@DllNotFoundException: fmodstudio FMOD.Memory.GetStats](https://qa.fmod.com/t/dllnotfoundexception-fmodstudio-fmod-memory-getstats/15279):
>
> We are having random errors in our build - not all the time and the Dlls are there. Unity 2019.1.9f1 Fmod 2.00.06 [Exception] DllNotFoundException: fmodstudio FMOD.Memory.GetStats (System.Int32& currentalloced, System.Int32& maxalloced, I was looking at the script execution order and am wondering why the StudioListener and RuntimeManager are executed later than default time. Isn’t that a problem? Thanks, Simon

So I guess it’s a common problem, but I don’t know about the solution. I confirmed that fmodstudioL.dll is located under `Assets/Plugins/FMOD/lib/win/x86_64` in my Unity project, and `Plugins/x86_64` in the data folder in the Windows build.

Any help would be appreciated - thanks.

---

<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:** [August 9, 2021, 1:24am UTC](https://qa.fmod.com/t/unity-dllnotfoundexception-fmodstudiol-when-calling-fmod-memory-getstats/17539/2 "2021-08-09T01:24:52Z")

</div>

One thing to check is the platform settings for each dll:

- Select “Assets/Plugins/FMOD/lib/win/x86\_64/fmodstudioL.dll” in Unity

- Make sure it looks like this in the inspector 

- Also make sure that “Assets/Plugins/FMOD/lib/win/x86/fmodstudioL.dll” is only ticked for x86

Other than that, try reinstalling the FMOD Unity Integration. If it’s still not working, please provide your FMOD and Unity versions, and which platform you are building too, and I will take a closer look!

---

<div class="post-metadata">

**Author:** ![\_eternal](https://avatars.discourse-cdn.com/v4/letter/_/ea5d25/32.png) [@\_eternal](https://qa.fmod.com/u/_eternal)\
**Post date:** [August 9, 2021, 2:22pm UTC](https://qa.fmod.com/t/unity-dllnotfoundexception-fmodstudiol-when-calling-fmod-memory-getstats/17539/3 "2021-08-09T14:22:25Z")

</div>

Thank you. The DLL import settings were incorrect in my project, so I changed them based on your instructions and it works now.
