Dialogue option not closing as soon as an option is pressed

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
madesi
Posts: 7
Joined: Wed Dec 14, 2022 2:31 am

Dialogue option not closing as soon as an option is pressed

Post 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:
Attachments
ss.PNG
ss.PNG (41.33 KiB) Viewed 347 times
User avatar
Tony Li
Posts: 21961
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.
madesi
Posts: 7
Joined: Wed Dec 14, 2022 2:31 am

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

Post 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
madesi
Posts: 7
Joined: Wed Dec 14, 2022 2:31 am

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

Post by madesi »

i ve been trying to set up the auto focus setting but it seems like nothing happen
User avatar
Tony Li
Posts: 21961
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.
Post Reply