# Multiple FMOD\_StudioSystem instances generated

**URL:** <https://qa.fmod.com/t/multiple-fmod-studiosystem-instances-generated/12047>\
**Category:** Unity\
**Created:** [September 10, 2015, 11:19am UTC](https://qa.fmod.com/t/multiple-fmod-studiosystem-instances-generated/12047 "2015-09-10T11:19:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GianniRicciardi](https://avatars.discourse-cdn.com/v4/letter/g/f17d59/32.png) [@GianniRicciardi](https://qa.fmod.com/u/GianniRicciardi)\
**Post date:** [September 10, 2015, 11:19am UTC](https://qa.fmod.com/t/multiple-fmod-studiosystem-instances-generated/12047/1 "2015-09-10T11:19:32Z")

</div>

Hello I found a strange behaviour in Unity 5.2.0f3 with Fmod Studio 1.06.07 integration plugin that looks like a bug:

Everytime I start the game in the Unity Editor, a new FMOD\_StudioSystem is created in the scene.  
The problem is that when I stop the game that object is not deleted, so everytime I click on Play in the Unity Editor a new FMOD\_StudioSystem is istanciated.  
I figure out I have about 10 FMOD\_StudioSystem in my unity scene, this of course burn system resources and may have other undesiderable side effect

There’s something we can do to avoid this issue?  
Thank you for your help

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [September 11, 2015, 4:04am UTC](https://qa.fmod.com/t/multiple-fmod-studiosystem-instances-generated/12047/2 "2015-09-11T04:04:53Z")

</div>

Do you have any components that are executing FMOD related code during OnDestroy()?

---

<div class="post-metadata">

**Author:** ![GianniRicciardi](https://avatars.discourse-cdn.com/v4/letter/g/f17d59/32.png) [@GianniRicciardi](https://qa.fmod.com/u/GianniRicciardi)\
**Post date:** [September 14, 2015, 12:42pm UTC](https://qa.fmod.com/t/multiple-fmod-studiosystem-instances-generated/12047/3 "2015-09-14T12:42:52Z")

</div>

Yes I found a component with some Stop Sound code there  
We moved it to OnDisable() and now everything seems to work

Thanks

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [September 17, 2015, 1:56am UTC](https://qa.fmod.com/t/multiple-fmod-studiosystem-instances-generated/12047/4 "2015-09-17T01:56:08Z")

</div>

Another solution is to use the Script Execution Order within Unity to move FMOD\_StudioSystem after all the other scripts.

This will have the additional benefit of moving the FMOD\_StudioSystem’s update after all other component updates which can help reduce latency of commands.
