[Solved!] How to find out if a conversation is running via C# script.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
CodePrincess
Posts: 111
Joined: Thu Sep 27, 2018 11:06 pm

[Solved!] How to find out if a conversation is running via C# script.

Post by CodePrincess »

For those of you following my programming adventures (Hi, Tony!), I've been trying to make a menu activate after a conversation loaded from a game save ends. It seems like some kind of "Conversation ended" signal is set off immediately when a conversation in a game save is loaded.

Now I want to try activating the menu when a conversation isn't running. That's in DialogueSystemController, right?
How should I access that information?

Thank you very much for lending an ear.
Last edited by CodePrincess on Tue Nov 10, 2020 8:19 pm, edited 1 time in total.
Thank you so much for your help.

Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to find out if a conversation is running via C# script.

Post by Tony Li »

Hi Melissa,

There are several ways to know when a conversation is active and when one starts or ends.

To check if a conversation is active, check DialogueManager.isConversationActive.

To be notified when a conversation ends:
CodePrincess
Posts: 111
Joined: Thu Sep 27, 2018 11:06 pm

Re: [Solved!] How to find out if a conversation is running via C# script.

Post by CodePrincess »

Oooohhh, DialogueManager! Of course!

That did it! My Scene Menu is saved!

Thanks again, SuperTony!
Thank you so much for your help.

Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: [Solved!] How to find out if a conversation is running via C# script.

Post by Tony Li »

Awesome! Happy to help!
Post Reply