Page 1 of 1

Buttons: "Enter" (keyboard) South button (gamepad) work as ContinueButton without registration in input

Posted: Fri Jul 15, 2022 8:30 am
by Saper
Hi Tony

We have problem with input we can't locate where unity/dialogue system set "Enter" and "South Button" to work as Continue Button in ours dialogues. We don't have those button registered in input map or submitted to a Continue button, screens below:

Re: Buttons: "Enter" (keyboard) South button (gamepad) work as ContinueButton without registration in input

Posted: Fri Jul 15, 2022 8:56 am
by Tony Li
Hi,

Try assigning your Submit input to the EventSystem GameObject's InputSystemUIInputModule component > Submit property.

Explanation:

Unity UI has a GameObject named EventSystem that handles interaction with UI elements. It does this by way of its EventSystem component and, when using the Input System package, the InputSystemUIInputModule.

The EventSystem keeps track of which UI element has focus (i.e., is "selected"). If you're using a joystick, or if you've ticked the Dialogue Manager GameObject's Input Device Manager component > Always Auto Focus, the continue button will receive focus whenever its subtitle panel is open.

You can configure which input actions the InputSystemUIInputModule uses for various actions such as Submit (clicking the current selection) and navigation between UI elements. By default, the InputSystemUIInputModule points to a default InputActions asset that maps Submit to Enter, Space, and Joystick South. If you change this to point to your custom InputActions' Submit, it will only check Space, E, and Gamepad North. You can also get rid of the UIButtonKeyTrigger component on the continue button if Always Auto Focus is ticked.

Re: Buttons: "Enter" (keyboard) South button (gamepad) work as ContinueButton without registration in input

Posted: Fri Jul 15, 2022 9:18 am
by wauPixmilk
Thank you for the quick reply.
The thing is that we already have selected UI/Submit in our InputSystemUIInputModule. Still, as my colleague said we receive "dialogue skips" on the not-related buttons/keys...
pic.png
pic.png (45.89 KiB) Viewed 677 times

Re: Buttons: "Enter" (keyboard) South button (gamepad) work as ContinueButton without registration in input

Posted: Fri Jul 15, 2022 9:49 am
by Tony Li
Hi,

In that screenshot, notice that the InputSystemUIInputModule's Actions Asset points to DefaultInputActions. This is a basic, built-in InputActions asset. Try assigning your own InputActions asset.

Re: Buttons: "Enter" (keyboard) South button (gamepad) work as ContinueButton without registration in input

Posted: Fri Jul 15, 2022 10:25 am
by wauPixmilk
Damn you are right. I completely forgot we switched to the default one after having issues with restoring UI input in some cases... Thank you very much!

Re: Buttons: "Enter" (keyboard) South button (gamepad) work as ContinueButton without registration in input

Posted: Fri Jul 15, 2022 1:47 pm
by Tony Li
Hope it helped!