Page 1 of 1

Stop all sequences?

Posted: Sat Apr 01, 2023 6:45 pm
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.

Re: Stop all sequences?

Posted: Sat Apr 01, 2023 7:06 pm
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();
}