How to get Unity input axis as a variable in script

I’m using Unity 2019 LTS, but i can’t change things in Input Manager in run time so i need to write my own.
I get everything since it’s just a keycode with dictionary. But i can’t make an axis similar to one in Input manager.

I search in online but didn’t see anyone look for same thing or i’m searching in wrong name.
I even look at every variable name includes “input” or “axix” but none of them is this axis.
Or maybe they are just not public.

You have multiple options:

  • write your own input manager from scratch or based on an existing one
  • use a free one, for example: GitHub - daemon3000/InputManager: Custom InputManager for Unity (please investigate before, I haven’t used it in years)
  • use a paid one: Rewired, InControl, etc (these are great as well)
  • just switch to the InputSystem already, it’s absolutely great

I also would think about upgrading Unity under my project, the support for 2019 is long gone, you can’t expect any bug fixes anymore.

1 Like

I heard it before but thought it’s same as Input Manager. (English isn’t my main language and i’m not good at it)
I’m start searching, If it’s the thing i’m looking for -which is Input manager but bindable- that would be very great.

For the 2019 version. I use it because it’s the most stable for me, at least for this project. When ever i ported into newer versions it keep crashes. Maybe it’s because project is got lot bigger (I know it’s a bit late to about think input system now)
But for the new projects, i don’t know which version is most stable, any recommendation?

Well, sort of. It’s obviously somewhat different, but yeah, it’s a replacement and it has rebinding system in place.

Installation: Installation guide | Input System | 1.7.0
How to use similarly to the old InputManager: Migrating from the old input system | Input System | 1.7.0

1 Like