Repeat play the last music

When I dynamically replace the events in sudioeventemitter, the previous music will be played agpublic

class test : MonoBehaviour
{
public Button a;
public Button b;
public StudioEventEmitter s;
public void Start()
{
a.onClick.AddListener(()=>{
Play();
});

    b.onClick.AddListener(()=>{
        Stop();
    });
}
public void Play()
{
    s.EventReference.Path = "event:/BGM/system/yongyan_theme";
    s.EventReference.Guid = RuntimeManager.PathToGUID("event:/BGM/system/yongyan_theme");
    s.Play();
}

public void Stop()
{
    s.Stop();
    s.EventReference.Path = "event:/BGM/system/lobby";
    s.EventReference.Guid = RuntimeManager.PathToGUID("event:/BGM/system/lobby");
    s.Play();
}

}ain

There is currently no way to set the event on a Studio Event Emitter using script, there is some discussion on it here.
You can try adding a method to the FMOD Studio Event Emitter that sets a new event:

// Assets/Plugins/FMOD/src/StudioEventEmitter.cs
public void ChangeEvent(string newEvent)
{
    EventReference = EventReference.Find(newEvent);
    EventInstance.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
    Lookup();
}
// test.cs
public void Play()
{
    s.ChangeEvent("event:/Music/Level 01");
    s.Play();
}

public void Stop()
{
    s.ChangeEvent("event:/Music/Level 02");
    s.Play();
}

The recommended approach is to create your own script. You can can take a look at how to call the FMOD Studio API yourself in the Unity Basic Scripting Example.