Hello Everyone!
I could really use your help.
I set up the Dialogue System to use ReWired inputs, and it seems to be working well.
When I start a conversation, I can trigger the 'Continue' Button with both the Keyboard and my Control Pad.
However, after I pause the game (which includes turning on other canvases) if I start a conversation, I can no longer trigger the Continue Button, I can ONLY Mouse Click it.
I have been beating my head against this problem for a day or two now, I would sincerely appreciate any help solving this issue.
Thanks so much!
Continue Button can only be Clicked After Pausing
Re: Continue Button can only be Clicked After Pausing
Hi,
There are two ways to solve this:
1. Inspect the Dialogue Manager GameObject's Input Device Manager component. Tick Always Auto Focus. This will keep a dialogue UI button focused (selected) even if you click away from the dialogue UI. When you open your pause menu, you'll need to tell the dialogue UI to not steal focus. Use this code when opening the pause menu:
and set it back to true when closing the pause menu.
2. Some designers prefer not to use Always Auto Focus because it will focus the first response button when the response menu appears. They don't want to subtly influence mouse-using players into preferring the first response just because it's focused. (If the Input Device Manager detects that you're using a joystick, it'll auto-focus anyway.) In this case, don't tick Always Auto Focus. Instead, before opening your pause menu, record the currently-selected UI button:
and when closing the menu re-select that button:
There are two ways to solve this:
1. Inspect the Dialogue Manager GameObject's Input Device Manager component. Tick Always Auto Focus. This will keep a dialogue UI button focused (selected) even if you click away from the dialogue UI. When you open your pause menu, you'll need to tell the dialogue UI to not steal focus. Use this code when opening the pause menu:
Code: Select all
PixelCrushers.UIPanel.monitorSelection = false;
2. Some designers prefer not to use Always Auto Focus because it will focus the first response button when the response menu appears. They don't want to subtly influence mouse-using players into preferring the first response just because it's focused. (If the Input Device Manager detects that you're using a joystick, it'll auto-focus anyway.) In this case, don't tick Always Auto Focus. Instead, before opening your pause menu, record the currently-selected UI button:
Code: Select all
GameObject previousSelection = EventSystem.current.currentSelectedGameObject;
Code: Select all
EventSystem.current.SetSelectedGameObject(previousSelection);
Re: Continue Button can only be Clicked After Pausing
Thanks for the reply Tony!
Appreciate your diligence!
So I did some digging, and it seems like the Continue Button is remaining 'Selected' as intended. However, the button will no longer trigger thru Keyboard or GamePad buttons, if I pause anytime before starting a Conversation.
Furthermore, I did some testing in the scene:
If I turn on the Pause Canvas by enabling the object in the hierarchy, the Continue Button does not break. But if I trigger the pause canvas with the pause button, it breaks.
I am using Corgi Engine, and ReWired. The only thing I can think that is happening when I pause vs. just turn on the object, is that the Time Scale becomes 0.
Would this affect the Continue Button Trigger in anyway?
EDIT*** I turned off the Time Stop and it still Breaks the Continue Button Link ...
EDIT EDIT *** DISREGARD ** ^^^
The Continue Button Link Break seems to be tied to 2 things:
Setting Time Scale to 0
And Pausing the Corgi Game Manager
if either or of these lines of code trigger, it breaks the link...
Im seriously stumped, and really really need to figure out how to get this Dialogue System to work.
Again, thanks so much for your help, I really appreciate it.
Appreciate your diligence!
So I did some digging, and it seems like the Continue Button is remaining 'Selected' as intended. However, the button will no longer trigger thru Keyboard or GamePad buttons, if I pause anytime before starting a Conversation.
Furthermore, I did some testing in the scene:
If I turn on the Pause Canvas by enabling the object in the hierarchy, the Continue Button does not break. But if I trigger the pause canvas with the pause button, it breaks.
I am using Corgi Engine, and ReWired. The only thing I can think that is happening when I pause vs. just turn on the object, is that the Time Scale becomes 0.
Would this affect the Continue Button Trigger in anyway?
EDIT*** I turned off the Time Stop and it still Breaks the Continue Button Link ...
EDIT EDIT *** DISREGARD ** ^^^
The Continue Button Link Break seems to be tied to 2 things:
Setting Time Scale to 0
And Pausing the Corgi Game Manager
if either or of these lines of code trigger, it breaks the link...
Im seriously stumped, and really really need to figure out how to get this Dialogue System to work.
Again, thanks so much for your help, I really appreciate it.
Re: Continue Button can only be Clicked After Pausing
FOUND IT!
For whatever reason... unpausing would cause the Event Systems 'Send Navigation Events' tick box to untick...
Looking into why / and how to remedy this now!
Will hopefully update with good news soon
*EDIT
Yup, somewhere deep in the Unpause Code it was turning off the 'Send Navigation Events' bool
FIXED!
For whatever reason... unpausing would cause the Event Systems 'Send Navigation Events' tick box to untick...
Looking into why / and how to remedy this now!
Will hopefully update with good news soon
*EDIT
Yup, somewhere deep in the Unpause Code it was turning off the 'Send Navigation Events' bool
FIXED!
Re: Continue Button can only be Clicked After Pausing
Glad you found it. Corgi turns off 'Send Navigation Events' when it closes the pause menu or an Inventory Engine UI. Make sure to add the DialogueSystemCorgiEventListener component to your Dialogue Manager as described on the Corgi integration page. That fixes it to allow other UIs (such as the Dialogue System's UIs) to function.