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
If you need to swap events at runtime, you could consider using an extended version of the emitter, for example:
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:
Hope this helps! Let me know if you have questions.