# Multiple issues after upgrading to Unity 2.01.09 from 2.01.08

**URL:** <https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126>\
**Category:** Unity\
**Tags:** unity\
**Created:** [April 28, 2021, 11:53am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126 "2021-04-28T11:53:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![florian13](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/florian13/32/597_2.png) [@florian13](https://qa.fmod.com/u/florian13)\
**Post date:** [April 28, 2021, 11:53am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/1 "2021-04-28T11:53:07Z")

</div>

I recently upgraded to Unity 2.01.09 package and am encountering the following issues:

- 
  1. When building with **IL2CPP ON** , I get “_StaticPluginManager does not exist in the current context_” (Plaform.cs line 266). The class is simply missing. Why? I had to comment this line out for now. Whatever that means, I am not using any “static” plugin.  
 ![Screenshot_7](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/3/3edcaa7e7e139020c448efbcc4d530c090d9275c.jpeg)  
  
  

- 
  1. Every time my C# gets **recompiled** , I have to wait for FMOD to do some obscur reimport work. I have tens of bank files (using AssetBundles Import Type) and it is significantly slowing down my workflow. The only temporary solution I found was so far to comment out “EditorApplication.delayCall += Startup” in EventManager.cs (line 450). I’ve notice this import window happening at random times, when it should definitely not. What is happening here?  
 ![Screenshot_6](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/1/167f5290ae91f9367ee48757319b49b09d2ea231.jpeg)  
  
  

- 
  1. When I build and run a Development build, my app doesn’t start because of a **missing library called libfmodstudioL**. I’ve checked its settings under FMOD\lib\android\arm64-v8a and “Android” is NOT checked. Checking it had no effect either. That problem doesn’t happen with a Prod build. Why is that happening?

All those issues happened after upgrading from 2.01.08. I do need 2.01.09 because it fixes a bug related to the “_Build banks to folders mirroring the banks browser hierarchy_” option.

Any help on those issues would be much appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![ben\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ben_fmod/32/1452_2.png) [@ben\_fmod](https://qa.fmod.com/u/ben_fmod)\
**Post date:** [April 29, 2021, 6:21am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/2 "2021-04-29T06:21:59Z")

</div>

Thanks for letting us know about these issues - sorry you’re seeing so many!

> [@florian13](#):
>
> 1. When building with **IL2CPP ON** , I get “ _StaticPluginManager does not exist in the current context_ ” (Plaform.cs line 266). The class is simply missing. Why?

This class should be generated by `Settings.PreprocessStaticPlugins()` when the scripting backend is IL2CPP. I’m not sure why it isn’t being generated in your case - perhaps you’re triggering the build in a way that we don’t handle correctly? Do you trigger the build by clicking Build in the Build Settings window, or some other way?

> [@florian13](#):
>
> 1. Every time my C# gets **recompiled** , I have to wait for FMOD to do some obscur reimport work.  
> …  
> I’ve notice this import window happening at random times, when it should definitely not. What is happening here?

Is your FMOD Studio project on a different drive from your Unity project? If so, it’s possible that the file timestamps have different resolutions, which could make it seem like the bank assets are always out of date, so FMOD keeps reimporting them.

> [@florian13](#):
>
> 1. When I build and run a Development build, my app doesn’t start because of a **missing library called libfmodstudioL**. I’ve checked its settings under FMOD\lib\android\arm64-v8a and “Android” is NOT checked. Checking it had no effect either. That problem doesn’t happen with a Prod build. Why is that happening?

This library should be enabled by `Settings.SelectBinaries()`. I’m not sure why that isn’t working - is it possible for you to put a breakpoint in that function and see if it gets called when you build a player?

---

<div class="post-metadata">

**Author:** ![florian13](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/florian13/32/597_2.png) [@florian13](https://qa.fmod.com/u/florian13)\
**Post date:** [April 29, 2021, 11:39am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/3 "2021-04-29T11:39:02Z")

</div>

Thanks for the quick reply @ben_fmod

1. I use a custom build script calling `BuildPipeline.BuildPlayer`. Though, I tried again today, uncommenting this section, and it worked. I have no idea what changed. I didn’t even restart Unity 🤨

2. My FMOD project is in the root directiory (next to the `Assets` folder). Not sure why the timestamp would be changing. Could you please give me direction on how to debug that?

3. Just placed a break point in there, and it seems like `SelectBinaries` is being called with `binaryType=Release` even though I’m building with the `BuildOptions.Development` flag ON. Further up, in `OnPreprocessBuild`, `EditorUserBuildSettings.activeScriptCompilationDefines` does not contains `"DEVELOPMENT_BUILD"`. Not sure what would be the reason. That issue remains, I can only run Prod builds at the moment, which is very problematic  
(EDIT: as a workaround, I forced `binaryType = Platform.BinaryType.Logging` and that made the trick, I can run Dev build again)

---

<div class="post-metadata">

**Author:** ![florian13](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/florian13/32/597_2.png) [@florian13](https://qa.fmod.com/u/florian13)\
**Post date:** [April 29, 2021, 1:35pm UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/4 "2021-04-29T13:35:11Z")

</div>

Well… it’s back 😅

In fact, it happens when I try to build my AssetBundles (via Addressables) with AddressableAssetSettings.BuildPlayerContent(). I should have realized that yesterday, my bad!

 ![Screenshot_4](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/0/0348dc692ea74ff0861573f651da772bdc8b3f1e.jpeg)

---

<div class="post-metadata">

**Author:** ![ben\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ben_fmod/32/1452_2.png) [@ben\_fmod](https://qa.fmod.com/u/ben_fmod)\
**Post date:** [April 30, 2021, 1:26am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/5 "2021-04-30T01:26:54Z")

</div>

> [@florian13](#):
>
> In fact, it happens when I try to build my AssetBundles (via Addressables) with AddressableAssetSettings.BuildPlayerContent(). I should have realized that yesterday, my bad!

Thanks, I have now reproduced this issue. `AddressableAssetSettings.BuildPlayerContent()` ends up calling `PlayerBuildInterface.CompilePlayerScripts()`, which unfortunately does **not** call `IPreprocessBuildWithReport.OnPreprocessBuild()`, which we rely on to generate the `StaticPluginManager` class.

I’m still looking into a way to fix this, but as a workaround you could try making `Settings.PreprocessBuild()` public, and calling it before calling `AddressableAssetSettings.BuildPlayerContent()`:

```auto
FMODUnity.Settings.Instance.PreprocessBuild(BuildTarget.StandaloneWindows64, FMODUnity.Platform.BinaryType.Logging);
AddressableAssetSettings.BuildPlayerContent();

```

* * *

> [@florian13](#):
>
> 1. My FMOD project is in the root directiory (next to the `Assets` folder). Not sure why the timestamp would be changing. Could you please give me direction on how to debug that?

Could you put a breakpoint on `EventManager.cs` line 623, and compare `sourceInfo` with `targetInfo`? That may shed some light on the issue.

```auto
    if (!targetInfo.Exists ||
        sourceInfo.Length != targetInfo.Length ||
        sourceInfo.LastWriteTime != targetInfo.LastWriteTime)
    {
        if (targetInfo.Exists) // <------------------------------ Breakpoint here
        {
            targetInfo.IsReadOnly = false;
        }

```

* * *

> [@florian13](#):
>
> Just placed a break point in there, and it seems like `SelectBinaries` is being called with `binaryType=Release` even though I’m building with the `BuildOptions.Development` flag ON. Further up, in `OnPreprocessBuild` , `EditorUserBuildSettings.activeScriptCompilationDefines` does not contains `"DEVELOPMENT_BUILD"` .

This sounds like the issue reported in [this thread](https://qa.fmod.com/t/unity-buildpipeline-buildplayer-dllnotfoundexception-fmodstudio/17122). Can you try the solution suggested there?

---

<div class="post-metadata">

**Author:** ![florian13](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/florian13/32/597_2.png) [@florian13](https://qa.fmod.com/u/florian13)\
**Post date:** [April 30, 2021, 8:00am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/6 "2021-04-30T08:00:54Z")

</div>

Thanks again for your support @ben_fmod

These workarounds will definitely help waiting for 2.01.10

I put a breakpoint there but it doesn’t trigger when code recompiles (even though I see banks being reimported):

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/7/765bc062ca76eb49643c4e189b9bae8e39bb17a1.png)

Let me know if you wish me to try anything else. Or I’d be happy to jump on a call if you want to dig further (I’m based in France).

---

<div class="post-metadata">

**Author:** ![ben\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ben_fmod/32/1452_2.png) [@ben\_fmod](https://qa.fmod.com/u/ben_fmod)\
**Post date:** [April 30, 2021, 11:24am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/7 "2021-04-30T11:24:54Z")

</div>

Thanks for the additional info. I’m still trying to figure out what could be causing the reimport, and that helps to narrow it down. Unfortunately I’m going to be on leave next week, but I should be able to get back to you the week after that.

---

<div class="post-metadata">

**Author:** ![florian13](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/florian13/32/597_2.png) [@florian13](https://qa.fmod.com/u/florian13)\
**Post date:** [April 30, 2021, 12:56pm UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/8 "2021-04-30T12:56:23Z")

</div>

Sounds good. Waiting for your feedback then.

I’d like to make a suggestion as well: it’d be great if you guys could revert any platform dependent change post-build to avoid version control mess.

This is what Plastic looks like after I built in Development mode (files were previously versioned for Prod).

 ![Screenshot_7](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/b/bf5ec0e2b581c18f7a8a16f87f0dda64903d17fb.jpeg)

---

<div class="post-metadata">

**Author:** ![klei.victorchow](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@klei.victorchow](https://qa.fmod.com/u/klei.victorchow)\
**Post date:** [April 30, 2021, 10:00pm UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/9 "2021-04-30T22:00:30Z")

</div>

FYI, issue (1) regarding the StaticPluginManager also exists with v2.02.00 of the Unity integration.

---

<div class="post-metadata">

**Author:** ![remi.boscher](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@remi.boscher](https://qa.fmod.com/u/remi.boscher)\
**Post date:** [May 3, 2021, 8:14am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/10 "2021-05-03T08:14:43Z")

</div>

Hello, very bad english ahead : we are also having issues after upgrading our Unity version to 2020.3.4 and our Fmod version to 2.01.09, i’ve tried to add  
“FMODUnity.Settings.Instance.PreprocessBuild(BuildTarget.StandaloneWindows64, FMODUnity.Platform.BinaryType.Logging)”;  
just before  
“AddressableAssetSettings.BuildPlayerContent()”

It didn’t fix the problem, i’m also not sure if it is the same issue because what i can observe is that we seem to have no issue with a default build but whenever i’m trying to automate our build process through our build scripts we have errors at runtime not during the build process.

Our console indicates : fmodstudioL not found, when we build through our automated build process

FMODUnity.SystemNotInitializedException: [FMOD] Initialization failed —\> System.DllNotFoundException: fmodstudioL  
at (wrapper managed-to-native) FMOD.Memory.FMOD5\_Memory\_GetStats(int&,int&,bool)  
at FMOD.Memory.GetStats (System.Int32& currentalloced, System.Int32& maxalloced, System.Boolean blocking) [0x00001] in \*\Assets\Plugins\FMOD\src\Runtime\wrapper\fmod.cs:890

---

<div class="post-metadata">

**Author:** ![remi.boscher](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@remi.boscher](https://qa.fmod.com/u/remi.boscher)\
**Post date:** [May 5, 2021, 8:42am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/11 "2021-05-05T08:42:39Z")

</div>

So we found a work around before building addressable

create a script in runtime folder of fmod with this inside  
// This file was generated by FMOD for Unity from the Static Plugins list in the FMOD settings.

using System;  
using System.Runtime.InteropServices;

namespace FMODUnity  
{  
class StaticPluginManager  
{  
[DllImport(FMOD.VERSION.dll)]  
private static extern FMOD.RESULT FMOD5\_System\_RegisterDSP(IntPtr system, IntPtr description, IntPtr handle);

```
    public static void Register(FMOD.System coreSystem, Action<FMOD.RESULT, string> reportResult)
    {
    }
}

```

}

Build adressables  
Then very important : you have to delete it before building the game…  
At least you can continue working on your project

Any progress on a permanent fix would be much appreciated

---

<div class="post-metadata">

**Author:** ![remi.boscher](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@remi.boscher](https://qa.fmod.com/u/remi.boscher)\
**Post date:** [May 11, 2021, 4:43pm UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/12 "2021-05-11T16:43:02Z")

</div>

Any updates ?

---

<div class="post-metadata">

**Author:** ![ben\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ben_fmod/32/1452_2.png) [@ben\_fmod](https://qa.fmod.com/u/ben_fmod)\
**Post date:** [May 12, 2021, 11:40pm UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/13 "2021-05-12T23:40:13Z")

</div>

We now have a fix for the StaticPluginManager issue. It will be in the 2.01.10 release, which should be released in the next couple of weeks.

In the meantime, you should be able to work around it by adding a `using System.Reflection;` line to the top of `Platform.cs`, and replacing `Platform.LoadStaticPlugins()` with this code:

```auto
        // Loads static FMOD plugins for this platform.
        public virtual void LoadStaticPlugins(FMOD.System coreSystem, Action<FMOD.RESULT, string> reportResult)
        {
            if (StaticPlugins.Count > 0)
            {
#if !UNITY_EDITOR && ENABLE_IL2CPP
                // We use reflection here to avoid compile errors if the plugin registration code doesn't exist.
                // It should be generated by Settings.PreprocessStaticPlugins(), which is called from
                // IPreprocessBuildWithReport.OnPreprocessBuild(). However, some compilation scenarios
                // (such as AddressableAssetSettings.BuildPlayerContent()) don't call OnPreprocessBuild(),
                // so we can't generate the plugin registration code.

                string className = string.Format("FMODUnity.{0}", RegisterStaticPluginsClassName);
                Type type = Type.GetType(className);

                if (type == null)
                {
                    Debug.LogWarningFormat(
                        "FMOD: {0} static plugins specified, but the {1} class was not found.",
                        StaticPlugins.Count, className);
                    return;
                }

                MethodInfo method = type.GetMethod(RegisterStaticPluginsFunctionName,
                    BindingFlags.Public | BindingFlags.Static);

                if (method == null)
                {
                    Debug.LogWarningFormat(
                        "FMOD: {0} static plugins specified, but the {1}.{2} method was not found.",
                        StaticPlugins.Count, className, RegisterStaticPluginsFunctionName);
                    return;
                }

                method.Invoke(null, new object[] { coreSystem, reportResult });
#else
                Debug.LogWarningFormat(
                    "FMOD: {0} static plugins specified, but static plugins are only supported on the IL2CPP scripting backend",
                    StaticPlugins.Count);
#endif
            }
        }

```

---

<div class="post-metadata">

**Author:** ![ben\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ben_fmod/32/1452_2.png) [@ben\_fmod](https://qa.fmod.com/u/ben_fmod)\
**Post date:** [May 12, 2021, 11:47pm UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/14 "2021-05-12T23:47:13Z")

</div>

> [@remi.boscher](#):
>
> … what i can observe is that we seem to have no issue with a default build but whenever i’m trying to automate our build process through our build scripts we have errors at runtime not during the build process.
> 
> Our console indicates : fmodstudioL not found, when we build through our automated build process

This sounds like the issue reported in [this thread](https://qa.fmod.com/t/unity-buildpipeline-buildplayer-dllnotfoundexception-fmodstudio/17122). Can you try the solution suggested there?

---

<div class="post-metadata">

**Author:** ![ben\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ben_fmod/32/1452_2.png) [@ben\_fmod](https://qa.fmod.com/u/ben_fmod)\
**Post date:** [May 13, 2021, 12:08am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/15 "2021-05-13T00:08:36Z")

</div>

> [@florian13](#):
>
> I’d like to make a suggestion as well: it’d be great if you guys could revert any platform dependent change post-build to avoid version control mess.

Thanks, that’s a good idea - I’ve added it to our issue tracker.

---

<div class="post-metadata">

**Author:** ![ben\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ben_fmod/32/1452_2.png) [@ben\_fmod](https://qa.fmod.com/u/ben_fmod)\
**Post date:** [May 13, 2021, 12:46am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/16 "2021-05-13T00:46:57Z")

</div>

> [@florian13](#):
>
> I put a breakpoint there but it doesn’t trigger when code recompiles (even though I see banks being reimported):

Thanks, can you try commenting out the call to `RemoveEmptyFMODFolders()` from `EventManager.CopyToStreamingAssets()` (line 663)?

---

<div class="post-metadata">

**Author:** ![remi.boscher](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@remi.boscher](https://qa.fmod.com/u/remi.boscher)\
**Post date:** [May 14, 2021, 7:41am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/17 "2021-05-14T07:41:25Z")

</div>

Thank you so much gonna checkout those on Monday

---

<div class="post-metadata">

**Author:** ![florian13](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/florian13/32/597_2.png) [@florian13](https://qa.fmod.com/u/florian13)\
**Post date:** [May 14, 2021, 11:29am UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/18 "2021-05-14T11:29:19Z")

</div>

Thanks, I’ll try this on Monday too and get back to you asap

---

<div class="post-metadata">

**Author:** ![florian13](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/florian13/32/597_2.png) [@florian13](https://qa.fmod.com/u/florian13)\
**Post date:** [May 17, 2021, 3:53pm UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/19 "2021-05-17T15:53:43Z")

</div>

@ben_fmod I confirm commenting out `RemoveEmptyFMODFolders()` (on line 646) fixed the issue! Banks reimport don’t anymore happen on every code change.

---

<div class="post-metadata">

**Author:** ![ben\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ben_fmod/32/1452_2.png) [@ben\_fmod](https://qa.fmod.com/u/ben_fmod)\
**Post date:** [May 20, 2021, 1:07pm UTC](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126/20 "2021-05-20T13:07:33Z")

</div>

> [@florian13](#):
>
> I confirm commenting out `RemoveEmptyFMODFolders()` (on line 646) fixed the issue!

Thank you! We should have a fix for this issue in the 2.01.11 release.

If you have time, would you be able to try the proposed fix? It still needs to go through QA, but all you need to do is uncomment the call to `RemoveEmptyFMODFolders()` and delete the `AssetDatabase.ImportAsset(assetPath)` line from `EventManager.AssetHasLabel()`:

```auto
        private static bool AssetHasLabel(string assetPath, string label)
        {
            AssetDatabase.ImportAsset(assetPath); // <--- Delete this line
            UnityEngine.Object asset = AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(assetPath);
            string[] labels = AssetDatabase.GetLabels(asset);

            return labels.Contains(label);
        }

```

[Next page](https://qa.fmod.com/t/multiple-issues-after-upgrading-to-unity-2-01-09-from-2-01-08/17126.md?page=2)
