Page 1 of 1

Is there a Skip function?

Posted: Mon Feb 17, 2020 5:05 pm
by minomod
1. Suppose you have 10 lines.
2. I want to skip 10 or more conversations at once by pressing the skip button and end the conversation.
3. I want to create a skip button.

Re: Is there a Skip function?

Posted: Mon Feb 17, 2020 7:28 pm
by Tony Li
You can use this method to immediately end the conversation:

Code: Select all

DialogueManager.StopConversation();
Will that do what you want it to do?

Re: Is there a Skip function?

Posted: Mon Feb 17, 2020 7:55 pm
by minomod
Can I write it like this in my C # code?

Re: Is there a Skip function?

Posted: Mon Feb 17, 2020 8:17 pm
by Tony Li
Yes. Also put this at the top of your script:

Code: Select all

using PixelCrushers.DialogueSystem;
Or use the full name:

Code: Select all

PixelCrushers.DialogueSystem.DialogueManager.StopConversation();
Or, if you don't want to write any C# code, you can point a UnityEvent, such as the OnClick() event of a UI Button, to the Dialogue Manager's DialogueSystemController.StopConversation method. If you do this, make sure the UnityEvent's GameObject is also Don't Destroy On Load so it doesn't lose track of the Dialogue Manager during scene changes.

Re: Is there a Skip function?

Posted: Mon Feb 17, 2020 10:08 pm
by minomod
Thank you ~
You are my strong helper

Re: Is there a Skip function?

Posted: Tue Feb 18, 2020 7:47 am
by Tony Li
Happy to help!