Page 1 of 1

How to prevent alert from hiding on continue button?

Posted: Thu Feb 09, 2017 7:50 am
by fringilla
Hey, I am using DialogueManager.ShowAlert(message, duration) from code and when I'm using it during conversation, alert hides when I click continue button (continue conversation button, alert continue button is null). How do I force alert to stay?

Re: How to prevent alert from hiding on continue button?

Posted: Thu Feb 09, 2017 12:28 pm
by Tony Li
Hi,

I'll post a short script here later today to change the behavior so the conversation's continue button doesn't close the alert. What GUI system are you using? Unity UI Dialogue UI?

Re: How to prevent alert from hiding on continue button?

Posted: Thu Feb 09, 2017 3:52 pm
by fringilla
Yes, Unity UI Dialogue UI. Thanks!

Re: How to prevent alert from hiding on continue button?

Posted: Thu Feb 09, 2017 8:13 pm
by Tony Li
Great! Please import this package: ContinueButtonOptions_2017-02-09.unitypackage

If you're using the Unity UI Continue Button Fast Forward component on your continue button, add the UnityUIContinueButtonFastForwardConversation script to your continue button. Configure it the same as the existing Unity UI Continue Button Fast Forward component, then delete the original Unity UI Continue Button Fast Forward component. Finally, point the OnClick() event to UnityUIContinueButtonFastForwardConversation.OnFastForward:

Image

If you're not using the Unity UI Continue Button Fast Forward component on your continue button, add the ConversationContinueButton script, and point the OnClick() event to ConversationContinueButton.ContinueConversation:

Image

You may find that the alert's continue button also continues the conversation. To change that behavior, inspect your alert's Continue Button, and point the OnClick() event to UnityUIDialogueUI.HideAlert:

Image

Re: How to prevent alert from hiding on continue button?

Posted: Fri Feb 10, 2017 9:32 am
by fringilla
Thanks! That works like a charm :)

Also, how to make current alert hide before showing the next queued one?