Is it possible? I’ve looked for it but there doesn’t seem to be any post nor documentation about it…
I need it because the free Xbox Controller driver is mapped different than the Windows Xbox driver. The buttons are map-able by code, but I can’t find any Input method that returns the axis of an analog joystick.
Cookie for answer. Promised.
Are you trying to determine at run time what axis a specific control on a game controller corresponds to? Is this for an in-game control configuration menu? Or something else?
Thanks for your concern Jesse, but meanwhile I’ve found a solution.
It is not possible to access the raw axis input from the controller’s analog sticks by code, like it IS possible with buttons with KeyCode. But you can have different Input buttons through the Unity Input Manager under Edit > Project Settings. I need to make the same control sceme for both OSX and Windows PC’s, meaning that on an OSX machine the ‘joystick button 9’ is the ‘Start’ button, but on a Windows machine the same button is ‘joystick button 4’ (for example). I will probably name them like ‘Start OSX’ and ‘Start Win’ and check with code on which OS the game is operating, picking the right control sceme.

I see what you mean. Yeah, technically you can access any controller button via GetKey(Down)(), except that strangely, the KeyCode enums for controller number 4 are missing
Just an oversight I guess. (I submitted a bug report on this a while back, but I don’t think it’s been fixed yet.) But yeah, I don’t think there’s any corresponding method for querying the value of an arbitrary controller axis (other than creating an axis in the input manager for every possible controller axis, that is).
Anyway, glad you found a solution 