Gamepad Detection (DEF-3349) (SOLVED)

#1

I am wondering if there is a way to check whether a gamepad is connected during runtime.
In my game I am providing input for both keyboard and controllers. I have prompts that show what buttons to press for certain actions. I don’t want the controller prompts to show up if there isn’t a controller connected.

2 Likes

#2

There is no built in way to do this. I was working on a solution a while ago but didn’t finish it.

You can detect all gamepad buttons, and only begin to show prompts once a single button has been pressed, otherwise assume keyboard.

2 Likes

#3

Runtime detection of gamepads reported as DEF-3349

4 Likes

#4

Solved in 1.2.157 Defold 1.2.157 has been released

2 Likes