# Stop an instance in Unity

**URL:** <https://qa.fmod.com/t/stop-an-instance-in-unity/22010>\
**Category:** Unity\
**Created:** [August 16, 2024, 6:27pm UTC](https://qa.fmod.com/t/stop-an-instance-in-unity/22010 "2024-08-16T18:27:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [August 19, 2024, 2:08am UTC](https://qa.fmod.com/t/stop-an-instance-in-unity/22010/2 "2024-08-19T02:08:01Z")

</div>

Hi, no worries!

What we will want to do is keep a reference to the [Event Instance](https://fmod.com/docs/2.02/api/studio-api-eventinstance.html) rather than just in the `Start()` function.  
Create a

```auto
private FMOD.Studio.EventInstance MM; 

```

variable.  
Then we will be able to assign the instance to it from `RuntimeManager.CreateInstance` while also being able to call in from the `public void Click_Play()` function.

To aid with debugging I would also suggest learning about our [FMOD\_RESULT](https://fmod.com/docs/2.02/api/core-api-common.html#fmod_result) which is returned from most of our functions. You can check the result using something like this:

```auto
FMOD.RESULT result = MM.start();
if (result != FMOD.OK)
{
    Debug.Log(result);
}

```

Hope this helps! If you have any more questions, please do not hesitate to ask.

---

_[View the full topic](https://qa.fmod.com/t/stop-an-instance-in-unity/22010)._
