Page 2 of 2
Re: Disable Continue Button key On Pause
Posted: Wed Oct 06, 2021 2:21 pm
by fallingstarint
Hello,
sorry to disturb again this conversation but I have another problem with my continue button.
It is working fine with a controller but somehow when I use a mouse it unclickable. Would you know why?
I have my "Submit" input set to "return" and "joystick 0" as positive values but if I set it to "mouse 0" for example, it doesn't work. (return and joystick work though).
Any idea?
Re: Disable Continue Button key On Pause
Posted: Wed Oct 06, 2021 2:54 pm
by Tony Li
Hi,
The Unity UI EventSystem handles mouse input differently. It doesn't use input definitions. Instead, it uses a GraphicRaycaster component. Make sure your dialogue UI's Canvas has a GraphicRaycaster that's enabled, and that no other UI elements (including transparent ones) are blocking the continue button.
If you keep an Inspector view on the EventSystem, during play the bottom part of the inspector will show what UI element it's detecting under the mouse cursor.
Re: Disable Continue Button key On Pause
Posted: Wed Oct 06, 2021 3:00 pm
by fallingstarint
Hello Tony,
ok so I checked the layers that may block it and since nothing was blocking it, I tried to set colors to the button on hover and pressed and turns out that the button seems to be selected (due to the always focus of the gamepad I guess) and seems to be clickable when I use the mouse but it just doesn't fire the next line...
Any idea?
Re: Disable Continue Button key On Pause
Posted: Wed Oct 06, 2021 3:47 pm
by Tony Li
Is the continue button's OnClick() UnityEvent configured? If the button has a StandardUIContinueButtonFastForward component, you can configure OnClick() to call its OnFastForward method. Otherwise, you can configure Onclick() to call the dialogue UI's OnContinueConversation method.
Re: Disable Continue Button key On Pause
Posted: Wed Oct 06, 2021 4:20 pm
by fallingstarint
It actually already has a StandardUIContinueButtonFastForward component and its onClick event as well, this still doesn't do the trick...
The continue is clickable, it fires the line if I press the "return" button, but clicking it doesn't fire the line, it simple is clickable...
Re: Disable Continue Button key On Pause
Posted: Wed Oct 06, 2021 5:28 pm
by Tony Li
Are there any errors or warnings in the Console window?
Please set the button's Pressed Color to a unique color. When you click the button with the mouse, does the button change to the Pressed Color?
As a test, try adding something visually obvious to the continue button's OnClick() events, such as enabling or disabling some GameObject. When you click the button, does it do the thing (e.g., enable/disable object)?
Re: Disable Continue Button key On Pause
Posted: Wed Oct 06, 2021 6:03 pm
by fallingstarint
The button is continuously selected like if it couldn't be clickable because its state changed every x seconds but very quickly. Only the press of the "return" key works.
I even tried to
- set up the "mouse 0" instead of the "return" key and same result
- put the continue button on another layer and same result
- put the continue button on another panel and same result
- delete the button and make a totally new one and same result
- delete the button and make a new one without autofocus and the button doesn't fire anything even if I press return...
The only solution I found was to set the "space" bar instead of "return" key as it is more natural but I'll have somehow to find a clever way for my players to understand they have to press space or another key if they use controler :/
Re: Disable Continue Button key On Pause
Posted: Wed Oct 06, 2021 8:35 pm
by Tony Li
To what are you assigning "mouse 0" and "return"?
Are you using a UI Button Key Trigger component? (If so, try removing it.)
Does this only happen on the continue button? What about response menu buttons? And other, non-Dialogue System buttons?
Re: Disable Continue Button key On Pause
Posted: Thu Oct 07, 2021 3:50 am
by fallingstarint
Hello,
I tried to assign it to "Submit" to see if it would do the trick but it doesn't... And no I am not using a UI Button Key Trigger component anywhere.
It happens only on the continue button, everything else is fine
Ho well, I'll work around it with clever UI hints for players to continue the dialogue...
Re: Disable Continue Button key On Pause
Posted: Thu Oct 07, 2021 8:54 am
by Tony Li
Can you send a
reproduction project to tony (at) pixelcrushers.com?
You shouldn't have to make the user go through hoops to continue.
Does DemoScene1 work correctly with the continue button? You'll need to set the Dialogue Manager's Display Settings > Subtitle Settings > Continue Button to Always and tick the Input Device Manager's Always Auto Focus before testing.
If it works, then the issue is specific to your scene/UI setup, and I'm sure we can get it straightened out quickly with a repro project. If it doesn't work, then the issue is probably related to your input manager setup, and again a repro project will tell us why.