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

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Saper
Posts: 52
Joined: Tue Jan 12, 2021 11:25 am

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

Post 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:
Attachments
Input Map
Input Map
Input_4.png (26.95 KiB) Viewed 747 times
Continue Button
Continue Button
Input_3.png (22.43 KiB) Viewed 747 times
Registration script
Registration script
Input_2.png (22.73 KiB) Viewed 747 times
InputDeviceManager Dialogue Manager
InputDeviceManager Dialogue Manager
Input_1.png (47.17 KiB) Viewed 747 times
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.
wauPixmilk
Posts: 7
Joined: Fri Jul 15, 2022 9:10 am

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

Post 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 740 times
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.
wauPixmilk
Posts: 7
Joined: Fri Jul 15, 2022 9:10 am

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

Post 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!
Post Reply