# \[Unity Visual Scripting\] Cannot change emitter's instance after the reference has changed

**URL:** https://qa.fmod.com/t/unity-visual-scripting-cannot-change-emitters-instance-after-the-reference-has-changed/23412
**Category:** Unity
**Tags:** unity
**Created:** [September 30, 2025, 4:34am UTC](https://qa.fmod.com/t/unity-visual-scripting-cannot-change-emitters-instance-after-the-reference-has-changed/23412 "2025-09-30T04:34:57Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)
#### Post date: [October 3, 2025, 6:23am UTC](https://qa.fmod.com/t/unity-visual-scripting-cannot-change-emitters-instance-after-the-reference-has-changed/23412/5 "2025-10-03T06:23:42Z")

</div>

Thank you for sharing the screenshots, it’s super helpful!

The built-in `StudioEventEmitter` is designed as a simple “one-event player.” It caches the event description the first time you play it, and it won’t refresh if you change the `EventReference` during runtime.

A similar discussion can be found here: [Changing a SudioEventEmitter's Event During Runtime - #2 by Leah\_FMOD](https://qa.fmod.com/t/changing-a-sudioeventemitters-event-during-runtime/19532/2)

If you need to swap events at runtime, you could consider using an extended version of the emitter, for example:

```auto
using FMODUnity;

public class StudioEventEmitterEx : StudioEventEmitter
{
    /// <summary>
    /// Change the event at runtime and refresh the cached description.
    /// </summary>
    public void SetEventAndRefresh(EventReference newEventRef)
    {
        // Stop current instance immediately
        AllowFadeout = false;
        Stop();

        // Assign new event
        EventReference = newEventRef;

        // Clear the cached description so next Play() will do Lookup()
        if (eventDescription.isValid())
        {
            eventDescription.clearHandle();
        }
    }
}

```

This adds a method that clears the cached description and refreshes the reference, so calling it before `Play()` ensures the new event is used.

Since you’re using Visual Scripting, you may need to run **FMOD \> Generate Visual Scripting Units** again for the new method to appear.

Here’s an example graph:

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

Hope this helps! Let me know if you have questions.

---

_[View the full topic](https://qa.fmod.com/t/unity-visual-scripting-cannot-change-emitters-instance-after-the-reference-has-changed/23412)._
