- Home /
Detecting Controllers
I am developing a game where the player can use multiple different controllers or the keyboard and mouse if they so choose. I would like them to be able to change controllers on the fly. I would like them to use the XBox360, Playstation4, and the Switch(at some point). What I want is that when the player plugs in, say the XBox360 controller, that my InputManager recognizes this and sets a variable to say the player is using the XBox360 controller and if they unplug it the game defaults to the keyboard and mouse. I am using Input.GetJoystickNames() and it is recognizing the XBox360 controller but it is not recognizing the Playstation4 controller, it is acting like there is no controller plugged in. The editor says "Wireless Connected" but nothing in Input.GetJoystickNames(). Am I doing something wrong? Is there a different/better way to go about it?