Can Input.GetAxis be used without assigning via the Input Manager?

I would like to query input state programatically; the Input Manager in the Editor is pretty much useless in my game.

I can do it already for keyboard/controller keys (via Input.GetKey(KeyCode.Whatever)), mouse, and touch. But it doesn’t seem to be possible to do the same for joystick axes. For example, there’s no Input.GetAxis(KeyCode.Joystick1Axis2).

I can’t find any information on this, but it is the only thing that is missing for me to bypass the Input Manager entirely. I’m perfectly happy to handle input in my own code, and I need key bindings/handling to be flexible. I would prefer not to use other input managers from the Asset Store.

Did I miss something? How can I query axes programatically (i.e. by not using the Input Manager bindings)?

Answer:

I don’t think so.

Workaround:

A engine provide a lot of tools to help you, try to bypass generally cause more frustration that learn how to use. Input Manager is how you configure inputs in your game.

Simple add all the inputs that you will need in input manager for each joystick and namely how do you desire, like “Joystick1Axis2”.

Later in code you access like Input.GetAxisRaw(“Joystick1Axis2”) or Input.GetAxis(“Joystick1Axis2”)