Total noob here, can't even get basic gamepad input to work

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
CMDR_Garbage
Posts: 1
Joined: Wed Jul 07, 2021 11:30 am

Total noob here, can't even get basic gamepad input to work

Post by CMDR_Garbage »

Good evening forum,

I've been struggling for a while on getting input done using the new unity input system.
My whole idea is to make a dialogue menu where you can choose between 4 options (each one is assigned to a gamepad button).
I've followed these tutorials:
The PDF that was provided with the package on the new input system.
The youtube tutorial.
Some forum posts like https://www.pixelcrushers.com/phpbb/vie ... php?t=2793

I've made an action map, made a script that assigns the input to the InputDevicemanager and the InputDeviceManager has has Joystick Key Codes To Check.
Still, when I put a simple debug on the "On Use Joystick" action nothing happens.
Though the documentation is great it's kinda too great, I can't seem to find my relevant information, any help?
User avatar
Tony Li
Posts: 21989
Joined: Thu Jul 18, 2013 1:27 pm

Re: Total noob here, can't even get basic gamepad input to work

Post by Tony Li »

Hi,

Here's an example that maps response menu buttons to gamepad A/B/X/Y:

DS_FourButtonNewInputSystemExample_2021-07-07.unitypackage

Play the 'Four Button UI Example New Input System' scene, not the 'Default Input Manager' one. The Dialogue Manager has a script named RegisterFourButtonInputWithDialogueSystem that gives the Dialogue System access to the InputActions asset. The response buttons have UI Button Key Trigger components that check the input names ('A', 'B', 'X', and 'Y').

On the other hand, if you want to navigate the buttons using the stick or d-pad, that's handled by Unity UI's EventSystem. Tick the Dialogue System Manager's Input Device Manager > Always Auto Focus checkbox to tell the Dialogue System to keep a button focused (selected) so you can navigate among them.
Post Reply