How to re-start a conversation using a button?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Simon C
Posts: 10
Joined: Sun Mar 09, 2025 6:58 pm

How to re-start a conversation using a button?

Post by Simon C »

Hi, I am making a button to quickly start and restart conversations for debugging purpose.

Currently, I add `DialogueSystemTrigger.OnUse` as the button's OnClick() listener. However, they could only start a conversation with an On Use trigger but cannot re-start the conversation from its beginning.

Is there anything I can do so that when the conversation is running, if the button is clicked again, the current conversation will start over from its beginning?

Thank you!
User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to re-start a conversation using a button?

Post by Tony Li »

Hi,

If you tick the Dialogue System Trigger's Actions > Start Conversation > Replace checkbox, it will stop the active conversation (if one is active) and start the trigger's conversation from the beginning.

Alternatively, you can call DialogueManager.StopConversation() or DialogueManager.StopAllConversations() in C# to stop any active conversations first.
Simon C
Posts: 10
Joined: Sun Mar 09, 2025 6:58 pm

Re: How to re-start a conversation using a button?

Post by Simon C »

Wow yeah the Replace option is exactly what I need. Thanks again Tony!
User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to re-start a conversation using a button?

Post by Tony Li »

Glad to help!
Post Reply