- Home /
KeyCode enum missing fourth joystick index
After a decision to add xbox controller support to my game, I've discovered that the KeyCode enum doesn't have values representing the values on a fourth device. Is this intended, and if so why? Currently the only methods I know of to check the button input on a gamepad is through Input.GetKey, Input.GetKeyXxx, and through Input.GetButton/GetButtonXxx using inputs created in the Input Manager. I'm unable to test this as I don't have four xbox controllers, but from what I can tell, would "joystick 4 button 0" register as an invalid argument?
Answer by jonas-echterhoff · Nov 22, 2011 at 09:27 AM
We will add enums for a forth joystick in Unity 3.5. Meanwhile, using either the string version ("joystick 4 button 0"), or just incrementing the enum (KeyCode)((int)KeyCode.Joystick3Button0 + 20) will work fine.
Your answer
Follow this Question
Related Questions
Input key codes for Logitech Extreme 3D Pro 2 Answers
Is there a way to create a floating JoyStick using the On-Screen Stick component? 0 Answers
How can I control cursor with joystick 4 Answers
Joystick Zone + Screen-swipe touch input clash. Solution??? 1 Answer
Using Right Joystick to Select Weapon in Weapon Wheel 1 Answer