Page 1 of 1

How to re-start a conversation using a button?

Posted: Thu Apr 10, 2025 2:11 am
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!

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

Posted: Thu Apr 10, 2025 7:38 am
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.

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

Posted: Fri Apr 11, 2025 2:23 am
by Simon C
Wow yeah the Replace option is exactly what I need. Thanks again Tony!

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

Posted: Fri Apr 11, 2025 8:06 am
by Tony Li
Glad to help!