Joystick button enumerants

I’m sure this is a completely silly question and I’m going to be embarrassed once I know the answer, but I’ll admit the answer isn’t jumping out at me.

I understand that Unity supports a maximum of four joysticks. In the KeyCode enum, JoystickButton[0-19] indicates a button on any joystick, while Joystick[1-3]Button[0-19] indicates a button on a specific joystick. Where are the enumerants for joystick 4? Shouldn’t there be a group of enumerants of the form Joystick4Button[0-19] as well?

What am I missing?

I think it’s what Unity is missing rather than what you’re missing. As far as I can tell they forgot to include Joystick4.

–Eric

Dang :expressionless: Guess I’ll just have to check them by name then. (Strangely, Unity seems to recognize the names ‘joystick [1-9] button *’ as valid names, even though only 4 joysticks are supported. Wonder why that is…)

Thanks for the reply - at least now I can stop puzzling over it :wink: