Dialogue option not closing as soon as an option is pressed
Dialogue option not closing as soon as an option is pressed
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 (41.33 KiB) Viewed 369 times
Re: Dialogue option not closing as soon as an option is pressed
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.
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
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
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
Add a DeselectPreviousOnPointerEnter component to your response button(s).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
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.