New Input System + Dialogue System Issue
- PayasoPrince
- Posts: 104
- Joined: Thu Jan 27, 2022 6:47 pm
Re: New Input System + Dialogue System Issue
I added it back and I kept Always Auto Focus unticked.
I also kept UI Button Trigger's "Skip If Being Clicked By Submit" checkbox unticked.
It looks like doing this made it so I can't trigger the Continue Button with mouse clicks which is great, but I am still able to trigger it with the Enter key for some reason. What other settings could be enabling this?
A strange scenario I am able to replicate:
- Hit Escape while my game is running and dialogue is up
- Click back into game
- Enter Key no longer triggers the ContinueButton for the first conversation. Only the Action I specified will trigger this.
- Every Continue button following this goes back to being triggered by the Enter key.
Here is my Input Device Manager
I also kept UI Button Trigger's "Skip If Being Clicked By Submit" checkbox unticked.
It looks like doing this made it so I can't trigger the Continue Button with mouse clicks which is great, but I am still able to trigger it with the Enter key for some reason. What other settings could be enabling this?
A strange scenario I am able to replicate:
- Hit Escape while my game is running and dialogue is up
- Click back into game
- Enter Key no longer triggers the ContinueButton for the first conversation. Only the Action I specified will trigger this.
- Every Continue button following this goes back to being triggered by the Enter key.
Here is my Input Device Manager
Re: New Input System + Dialogue System Issue
Hi,
Sorry, I meant to say tick (not UNtick) the UIButtonKeyTrigger's checkbox.
Try inspecting the subtitle panel(s) and response menu panel(s), and unticking "Select Previous On Disable".
When playing, keep an Inspector view on your EventSystem GameObject. In play mode, the bottom of the EventSystem's inspector will show what button is currently selected (focused). Nothing should be selected -- or, more importantly, the continue button should not be selected. This is because you're using UIButtonKeyTrigger instead of the usual EventSystem's Submit input. The Submit input clicks whatever button is currently selected.
Sorry, I meant to say tick (not UNtick) the UIButtonKeyTrigger's checkbox.
Try inspecting the subtitle panel(s) and response menu panel(s), and unticking "Select Previous On Disable".
When playing, keep an Inspector view on your EventSystem GameObject. In play mode, the bottom of the EventSystem's inspector will show what button is currently selected (focused). Nothing should be selected -- or, more importantly, the continue button should not be selected. This is because you're using UIButtonKeyTrigger instead of the usual EventSystem's Submit input. The Submit input clicks whatever button is currently selected.
- PayasoPrince
- Posts: 104
- Joined: Thu Jan 27, 2022 6:47 pm
Re: New Input System + Dialogue System Issue
So I ticked the "Skipped if Being Clicked By Submit" check box on the UI Button Key Trigger.
(Again, just to clarify, it is checked off.)
I also UNticked "Select Previous On Disable".
The issue is still occurring.
I checked out the inspector view of the EventSystem GameObject like you suggested and the EventSystem's inspector showed that the Continue button is Selected for some reason
(Again, just to clarify, it is checked off.)
I also UNticked "Select Previous On Disable".
The issue is still occurring.
I checked out the inspector view of the EventSystem GameObject like you suggested and the EventSystem's inspector showed that the Continue button is Selected for some reason
Re: New Input System + Dialogue System Issue
Can you send a reproduction project to tony (at) pixelcrushers.com?
- PayasoPrince
- Posts: 104
- Joined: Thu Jan 27, 2022 6:47 pm
Re: New Input System + Dialogue System Issue
Hey Tony,
I'm a bit hesitant on sending my project over.
Is there anyway I can see when and how the button is being focused/selected?
Edit: I've found WHY the Enter Key was still triggering the ContinueButton.
The "Actions Asset" on the Input System Input UI Module was set to the default. I set it to my own Class and that made things like "submit" and "back" become "none".
So, now the player can only hit the correct Action to trigger the ContinueButton, which is great. But I still need to remove the Focused/Selected button.
I'm a bit hesitant on sending my project over.
Is there anyway I can see when and how the button is being focused/selected?
Edit: I've found WHY the Enter Key was still triggering the ContinueButton.
The "Actions Asset" on the Input System Input UI Module was set to the default. I set it to my own Class and that made things like "submit" and "back" become "none".
So, now the player can only hit the correct Action to trigger the ContinueButton, which is great. But I still need to remove the Focused/Selected button.
Re: New Input System + Dialogue System Issue
Here's an example scene:
DS_TestNoContinueButtonSelection_2022-03-22.unitypackage
It uses Unity's built-in input, so you'll need to inspect the EventSystem GameObject and click the button to switch it to the Input System input module.
Then keep an inspector view on the EventSystem when you enter play mode. The conversation will start, and the EventSystem should show that nothing is currently selected.
DS_TestNoContinueButtonSelection_2022-03-22.unitypackage
It uses Unity's built-in input, so you'll need to inspect the EventSystem GameObject and click the button to switch it to the Input System input module.
Then keep an inspector view on the EventSystem when you enter play mode. The conversation will start, and the EventSystem should show that nothing is currently selected.
- PayasoPrince
- Posts: 104
- Joined: Thu Jan 27, 2022 6:47 pm
Re: New Input System + Dialogue System Issue
Thanks for providing that and working with me Tony.
I checked out your Demo Scene and saw that nothing started selected like you said.
I replicated all settings from the Dialogue Manager and the Standard Dialogue UI prefab. I took my time and made sure everything matched.
For some bizarre reason the Eventsystem is still showing my ContinueButton selected. This is driving me insane.
As a sanity check, I opened your Demo Scene again and I added my own Custom Dialogue UI Prefab in the Dialogue Managers Display Settings and it still worked. I.E. nothing was selected when I played it.
So I know nothing in my Dialogue UI Prefab is incorrect.... and my Dialogue Manager GameObject is identical to yours...
The only thing I can think of is I am doing this in Timeline and these are Conversation Clips. If you do this in Timeline with Start Conversation Clips are you still seeing nothing Selected?
I checked out your Demo Scene and saw that nothing started selected like you said.
I replicated all settings from the Dialogue Manager and the Standard Dialogue UI prefab. I took my time and made sure everything matched.
For some bizarre reason the Eventsystem is still showing my ContinueButton selected. This is driving me insane.
As a sanity check, I opened your Demo Scene again and I added my own Custom Dialogue UI Prefab in the Dialogue Managers Display Settings and it still worked. I.E. nothing was selected when I played it.
So I know nothing in my Dialogue UI Prefab is incorrect.... and my Dialogue Manager GameObject is identical to yours...
The only thing I can think of is I am doing this in Timeline and these are Conversation Clips. If you do this in Timeline with Start Conversation Clips are you still seeing nothing Selected?
Re: New Input System + Dialogue System Issue
Using the example scene I provided above, I tried starting the conversation from a Timeline's Start Conversation clip, and the EventSystem still correctly had nothing selected. You should be able to replicate the same thing with your copy of that scene.
Something else in your scene must be selecting the continue button.
You could try searching your code for "SetSelectedGameObject". This should catch code such as:
Something else in your scene must be selecting the continue button.
You could try searching your code for "SetSelectedGameObject". This should catch code such as:
Code: Select all
EventSystem.current.SetSelectedGameObject(something);
- PayasoPrince
- Posts: 104
- Joined: Thu Jan 27, 2022 6:47 pm
Re: New Input System + Dialogue System Issue
I tried searching and wasn't able to find anything.Tony Li wrote: ↑Tue Mar 22, 2022 8:22 pm e same thing with your copy of that scene.
Something else in your scene must be selecting the continue button.
You could try searching your code for "SetSelectedGameObject". This should catch code such as:
Code: Select all
EventSystem.current.SetSelectedGameObject(something);
However, I figured it out!!!
It was THIS:
It seems like if its set to Keyboard it will always select a button no matter what other settings you use. I changed it to Mouse and now its behaving the way your scene is.
Re: New Input System + Dialogue System Issue
That makes sense. When the Input Device Manager is set to Joystick or Keyboard, it always selects a UI button so you can navigate the UI using joystick or keyboard.