Unity Gamepad with UI Touch Support

This is probably a really simple topic, but it had me stumped for a bit, so I thought I’d post about it.

I have a Unity game I’m developing that I’m adding controller support to using the Unity Input System. One of the things I realized was that, when Unity detected that a gamepad/controller was connected, the UI stopped responding to touch.

The really simple fix is that Touchscreen needs to be added as an optional component to the Gamepad input settings.

First, find your Controls prefab and double-click it.

Click the drop-down next to All Controls and choose whatever you called your gamepad settings (I called mine Controller).

Click the dropdown next to Controller (or whatever you named this control scheme) and click Edit Control Scheme.

Gamepad should already be set to required.

Click the + icon, choose Touchscreen, and set it to optional.

That’s it! Now whenever a player connects a gamepad/controller they will still be able to use the UI in touchscreen mode.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.