Stop all sequences?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hipsterdufus
Posts: 97
Joined: Thu Aug 12, 2021 6:39 pm

Stop all sequences?

Post by hipsterdufus »

Hey there again. I was wondering if there's a way to stop all currently running sequences? For example I use the following in code to fade the screen:

Code: Select all

DialogueManager.PlaySequence($"Fade(in, 3)");
But in the meantime if a certain event happens I'd like to stop that sequence. It looks like that method returns a sequencer that I could stop but is there any way to stop all sequencers? Thank you.
User avatar
Tony Li
Posts: 22133
Joined: Thu Jul 18, 2013 1:27 pm

Re: Stop all sequences?

Post by Tony Li »

Hi,

You can call Sequencer.Stop() on all sequencers. By default, they're all on the Dialogue Manager, so you can use this C# code:

Code: Select all

foreach (var sequencer in DialogueManager.instance.GetComponents<Sequencer>())
{
    sequencer.Stop();
}
Post Reply