Page 1 of 1

Dialogue option not closing as soon as an option is pressed

Posted: Wed Jan 18, 2023 4:28 am
by madesi
Hello, im still learning to use the dialogue system. So im trying to make a dialogue with dialogue response option and i have a problem with the response option panel. When i tested the dialogue option after i choose one of the option, the dialogue option panel didnt instantly closed. Is there anyway to close the dialogue option panel instantly after i choose 1 of the option? Here is my Standard UI Menu Panel settings:

Re: Dialogue option not closing as soon as an option is pressed

Posted: Wed Jan 18, 2023 9:24 am
by Tony Li
Hello,

Make sure your response button (the Button assigned to the Standard UI Menu Panel's Button Template field) is configured one of these two ways:

1. Nothing at all is assigned to the Button component's OnClick() UnityEvent.

2. Or, if you've assigned other things to the OnClick() UnityEvent, also assign StandardUIResponseButton.OnClick.


If that doesn't help, check the menu panel's Animator. It's possible that it's trying to play a Hide animation but the animation is failing. A quick way to make sure the menu hides is to remove the menu panel's Animator component and clear the Standard UI Menu Panel's Show Animation Trigger and Hide Animation Trigger fields.

Re: Dialogue option not closing as soon as an option is pressed

Posted: Thu Feb 02, 2023 10:55 pm
by madesi
Thank you for the answer it works well, i have another question, is there anyway to set the dialogue choice option to make sure when an option is selected with keyboard arrow button and then we try to select another option with a mouse the only option is appear selected is the last one that is selected. Because when i select an option with keyboard and then decide to select another with mouse both option will appear selected

Re: Dialogue option not closing as soon as an option is pressed

Posted: Thu Feb 02, 2023 10:57 pm
by madesi
i ve been trying to set up the auto focus setting but it seems like nothing happen

Re: Dialogue option not closing as soon as an option is pressed

Posted: Fri Feb 03, 2023 8:06 am
by Tony Li
madesi wrote: Thu Feb 02, 2023 10:55 pmThank you for the answer it works well, i have another question, is there anyway to set the dialogue choice option to make sure when an option is selected with keyboard arrow button and then we try to select another option with a mouse the only option is appear selected is the last one that is selected. Because when i select an option with keyboard and then decide to select another with mouse both option will appear selected
Add a DeselectPreviousOnPointerEnter component to your response button(s).
madesi wrote: Thu Feb 02, 2023 10:57 pmi ve been trying to set up the auto focus setting but it seems like nothing happen
If you tick the Dialogue Manager GameObject's Input Device Manager component > Always Auto Focus, it should keep a response button focused (selected) while the response menu is being shown. Is that what you have done? If so, then if it's not working correctly please explain in what way it's not working correctly.