# Lag every 5 seconds

**URL:** <https://qa.fmod.com/t/lag-every-5-seconds/15241>\
**Category:** Unity\
**Created:** [November 21, 2019, 5:05pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241 "2019-11-21T17:05:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![RiseBasti](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/risebasti/32/820_2.png) [@RiseBasti](https://qa.fmod.com/u/RiseBasti)\
**Post date:** [November 21, 2019, 5:05pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/1 "2019-11-21T17:05:49Z")

</div>

Hello.

I just importet the Unity package of Fmod and now my unity is loading anything every 5 seconds. It happens in the editor and also in playmode. I’m not sure but i think it has something to do with refreshing of any banks or something?

The loading circle of my mouse is kind of “flickering” and it looks the same as if i press “Fmod/Refresh Banks”… The “Strings Bank Write Time” in “FMODStudioCacke” gets also refrehsed during the lag.

In the profiler while playing i can see that “Audio (WASAPI) Feeder T…” is doing something which causes the lag. (See Image)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/1X/0470a910b3604158cfb00100ad31e3c62c9a4974.png)

Does anybody know what possibly causes this problem and how to solve it?

Thank you very much.

---

<div class="post-metadata">

**Author:** ![kirushapojar](https://avatars.discourse-cdn.com/v4/letter/k/46a35a/32.png) [@kirushapojar](https://qa.fmod.com/u/kirushapojar)\
**Post date:** [November 22, 2019, 1:43am UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/2 "2019-11-22T01:43:09Z")

</div>

I have the same issue

---

<div class="post-metadata">

**Author:** ![RiseBasti](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/risebasti/32/820_2.png) [@RiseBasti](https://qa.fmod.com/u/RiseBasti)\
**Post date:** [November 22, 2019, 2:17pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/3 "2019-11-22T14:17:38Z")

</div>

I have found a solution for the problem…  
Reinstall Fmod 2.00.0.5 and also reinstall the unity plugin 2.00.0.5.

I just tested it and it works fine now.  
The new version 2.00.0.6 seams to cause this problem.

---

<div class="post-metadata">

**Author:** ![danpixeltoys](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/danpixeltoys/32/659_2.png) [@danpixeltoys](https://qa.fmod.com/u/danpixeltoys)\
**Post date:** [November 26, 2019, 9:57am UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/4 "2019-11-26T09:57:42Z")

</div>

We’ve been encountering the same problem on 2.00.06. It looks like it’s reimporting the banks every 5 seconds:

Line 529 in EventManager.cs

```
// Clean out any stale .bank files
string[] currentBankFiles = Directory.GetFiles(bankTargetFolder, "*." + bankTargetExension);
foreach (var bankFileName in currentBankFiles)
{
    string assetString = bankFileName.Replace(Application.dataPath, "Assets");
    AssetDatabase.ImportAsset(assetString);
    UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(assetString);
    string[] labels = AssetDatabase.GetLabels(obj);
    bool containsLabel = false;
    foreach (string label in labels)
    {
        if (label.Equals("FMOD"))
        {
            containsLabel = true;
            break;
        }
    }

    string bankName = Path.GetFileNameWithoutExtension(bankFileName);
    if (containsLabel && (!eventCache.EditorBanks.Exists((x) => bankName == x.Name)))
    {
        File.Delete(bankFileName);
        madeChanges = true;
    }
}

```

Reverting EventManager.cs to its state in 2.00.05 fixes the lag.

---

<div class="post-metadata">

**Author:** ![DanielWakefield](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/danielwakefield/32/831_2.png) [@DanielWakefield](https://qa.fmod.com/u/DanielWakefield)\
**Post date:** [November 26, 2019, 10:39pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/5 "2019-11-26T22:39:59Z")

</div>

We had the same issue here as well. I imported Fmod 2.00.06 into a completely empty project, ran the empty game and the banks were being loaded every five seconds causing a lag.

As suggested here, we replaced the EventManager.cs with the one from version 2.00.05 and it fixes the visible lag.

---

<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:** [November 26, 2019, 10:54pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/6 "2019-11-26T22:54:42Z")

</div>

Thanks everyone for the information, I have found the cause of this lag (importing assets to check the labels) and will get the fix out in the next release.

---

<div class="post-metadata">

**Author:** ![ckonner](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@ckonner](https://qa.fmod.com/u/ckonner)\
**Post date:** [December 1, 2019, 11:21pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/7 "2019-12-01T23:21:57Z")

</div>

Hey, can anyone link me to the script so I can replace my EventManager.cs with it? Our team updated to 2.00.06 from 2.00.00 so I don’t have the 2.00.05 to fall back on. Thanks 🙂

---

<div class="post-metadata">

**Author:** ![alfredbg](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@alfredbg](https://qa.fmod.com/u/alfredbg)\
**Post date:** [December 3, 2019, 2:26pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/8 "2019-12-03T14:26:40Z")

</div>

Delete old FMOD and import 20004 ver.  
Works fine for me.

 ![chrome_peuKQZgHXt](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/1X/13c9e78a65a877c87be3eed23046a1375a71fd35.png)

---

<div class="post-metadata">

**Author:** ![ckonner](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@ckonner](https://qa.fmod.com/u/ckonner)\
**Post date:** [December 3, 2019, 7:37pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/9 "2019-12-03T19:37:50Z")

</div>

Hey, thanks for the reply. I ended up getting my hands on the script from 2.00.05 and I’m having no issues now with 2.00.06.

---

<div class="post-metadata">

**Author:** ![Kazatron](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@Kazatron](https://qa.fmod.com/u/Kazatron)\
**Post date:** [December 3, 2019, 9:24pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/10 "2019-12-03T21:24:46Z")

</div>

I was having the same problem today. Really frustrating and delayed a whole days work trying to find the source. Can someone link the code to 2.00.05? Thanks. Or am I better off re-installing 2.00.05 version and relative it’s Unity Plug-in?

Thanks in advance,

Kaz

---

<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:** [December 3, 2019, 11:36pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/11 "2019-12-03T23:36:09Z")

</div>

It is probably best to keep the whole plugin on the same version, you can roll back the same way you update: [https://www.fmod.com/resources/documentation-unity?version=2.0&page=user-guide.html#updatingupgrading-the-integration](https://www.fmod.com/resources/documentation-unity?version=2.0&page=user-guide.html#updatingupgrading-the-integration)

---

<div class="post-metadata">

**Author:** ![firepunchd](https://avatars.discourse-cdn.com/v4/letter/f/65b543/32.png) [@firepunchd](https://qa.fmod.com/u/firepunchd)\
**Post date:** [December 5, 2019, 3:03pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/12 "2019-12-05T15:03:21Z")

</div>

Or just comment out these lines?

if (lastCheckTime + FilePollTimeSeconds \< Time.realtimeSinceStartup)  
{  
RefreshBanks();  
lastCheckTime = Time.realtimeSinceStartup;  
}

---

<div class="post-metadata">

**Author:** ![sickre](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@sickre](https://qa.fmod.com/u/sickre)\
**Post date:** [December 6, 2019, 11:51pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/13 "2019-12-06T23:51:44Z")

</div>

Getting this bug as well. Is there any confirmation of a fix coming for .00.007 and the ETA on that?

---

<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:** [December 9, 2019, 1:17am UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/14 "2019-12-09T01:17:24Z")

</div>

This fix will be in the 2.00.07 release, you can also find it on our [github repo](https://github.com/fmod/UnityIntegration) if you would like it earlier.

---

<div class="post-metadata">

**Author:** ![philfort](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@philfort](https://qa.fmod.com/u/philfort)\
**Post date:** [December 17, 2019, 1:24am UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/15 "2019-12-17T01:24:29Z")

</div>

This is a pretty bad bug. You should probably revert the default download to 2.00.05 until there is a release with a fix. I just wasted two hours trying to debug this until I happened to find this thread.

---

<div class="post-metadata">

**Author:** ![DREBOTgs](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@DREBOTgs](https://qa.fmod.com/u/DREBOTgs)\
**Post date:** [December 29, 2019, 4:50am UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/16 "2019-12-29T04:50:12Z")

</div>

Come on, update this. I also spent a lot of time trying to fix it.

---

<div class="post-metadata">

**Author:** ![reptilebeats](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/reptilebeats/32/540_2.png) [@reptilebeats](https://qa.fmod.com/u/reptilebeats)\
**Post date:** [January 3, 2020, 11:48pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/17 "2020-01-03T23:48:06Z")

</div>

ha was literally going to post this after banging my head against a wall for the last hour, problem is one of the older builds won’t work on osx, i’m on both platforms. hopefully 2.00.05 has the fix for osx if not should be an easy fix… maybe.

---

<div class="post-metadata">

**Author:** ![reptilebeats](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/reptilebeats/32/540_2.png) [@reptilebeats](https://qa.fmod.com/u/reptilebeats)\
**Post date:** [January 3, 2020, 11:48pm UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/18 "2020-01-03T23:48:42Z")

</div>

yay

---

<div class="post-metadata">

**Author:** ![godatplay](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@godatplay](https://qa.fmod.com/u/godatplay)\
**Post date:** [January 10, 2020, 1:30am UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/19 "2020-01-10T01:30:08Z")

</div>

Ran into this the hard way, it ruined a demo I was giving, tho I found someone talking about on the Unity forums thankfully to confirm it is caused by Fmod. This is a showstopper bug for any Unity project, so you really should remove it from your download list on the Fmod website.

And thanks for pointing us to the Github!

---

<div class="post-metadata">

**Author:** ![hwroeske](https://avatars.discourse-cdn.com/v4/letter/h/8edcca/32.png) [@hwroeske](https://qa.fmod.com/u/hwroeske)\
**Post date:** [January 19, 2021, 12:56am UTC](https://qa.fmod.com/t/lag-every-5-seconds/15241/20 "2021-01-19T00:56:31Z")

</div>

I hate to resurrect this old topic, but we’re seeing this happen when updating from FMOD 2.00.05 to 2.00.15. Commenting out the suggested lines solves the issue, but if there’s a more official solution, we’d rather implement that.

[Next page](https://qa.fmod.com/t/lag-every-5-seconds/15241.md?page=2)
