Announcements, support questions, and discussion for the Dialogue System.
hipsterdufus
Posts: 97 Joined: Thu Aug 12, 2021 6:39 pm
Post
by hipsterdufus » Sat Apr 01, 2023 6:45 pm
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.
Tony Li
Posts: 22131 Joined: Thu Jul 18, 2013 1:27 pm
Post
by Tony Li » Sat Apr 01, 2023 7:06 pm
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();
}