Multi Instrument Local Scope Playback Issue

I’m attempting to use a multi instrument and setting the playlist selection mode to Seq - Local Scope.

Below is the script being used and has been attached as a component to a gameobject in Unity.

public class FMODSingleMarker : MonoBehaviour
    FMOD.Studio.EventInstance reelMarker;

    // Start is called before the first frame update
    void Start()
        reelMarker = FMODUnity.RuntimeManager.CreateInstance("event:/sfx/symbols/markers/-Bonus Markers-/Bonus Marker 1 Test");

    // Update is called once per frame
    void Update()
        if (Input.GetKeyDown(KeyCode.T))

At runtime, when pressing the “T” key, playback does occur, but each time the key is pressed, it only plays the first audio source in the playlist.

I’m sure there is something simple that I have missed here!

For reference:
FMOD Studio 2.00.13
FMOD Unity Plugin 2.00.10
Unity 2020.3.9f1
Mac Big Sur 11.2.3

It sounds like you need to set the instrument’s playlist to loop, and set its play count equal to the number of playlist entries you want it to play.

Have you tried auditioning the event in FMOD Studio, to ensure it plays as you intend?

Hey Joseph, thanks for the reply!

I had not set the playlist to loop inside of studio. However, when I do, the desired behavior is still not what I was looking for inside of Unity. It’s also not what I thought it would be in Studio either: each time I hit play, the playlist continually plays the first playlist item.

The only way I can get it to cycle through the playlist is to keep the event in playback and use a looping region (or something similar) to continually trigger the multi instrument.

Perhaps I have an incorrect understanding of how the local scope works?

Functionally, what I thought would happen is that by creating an instance of the event and not releasing it, I could continually start the instance over and over (essentially triggering it as a one-shot) and it would cycle through the multi instrument in sequential order. My thought being that since the same instance of the event is being called each time (without being released between start() function calls), the local scope would apply.

Have I made the wrong presumption?

Thanks for your continued help!!

This sounds like you’ve enabled the loop instrument toggle button, rather than the loop playlist toggle button. (Or possibly you’ve toggled both.)

Yes, you have made the wrong presumption.

Restarting the event instance resets its state, causing it to behave as a new event instance. This means that it will start from the first entry in its playlist, just as if it was a new instance. I’ll make a note to clarify this point in our documentation.

If you want to play a different playlist entry each time you restart the event instance, you must instead use global scope.

Alternatively, if you want to start the event instance playing from the beginning without resetting the event instance to its initial state, you could set the timeline position to the start of the event - though of course, doing so will not affect other parameters in the event, and will not stop content already being played by the event instance.

Thanks so much for the clarification!