Search Unity

Question How to get Unity input axis as a variable in script

Discussion in 'Input System' started by Alde-Baran, Dec 5, 2023.

  1. Alde-Baran

    Alde-Baran

    Joined:
    Nov 15, 2019
    Posts:
    39
    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.
    upload_2023-12-5_18-27-58.png

    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.
     
  2. You have multiple options:
    - write your own input manager from scratch or based on an existing one
    - use a free one, for example: https://github.com/daemon3000/InputManager (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.
     
    Alde-Baran likes this.
  3. Alde-Baran

    Alde-Baran

    Joined:
    Nov 15, 2019
    Posts:
    39
    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?
     
  4. Well, sort of. It's obviously somewhat different, but yeah, it's a replacement and it has rebinding system in place.

    Installation: https://docs.unity3d.com/Packages/com.unity.inputsystem@1.7/manual/Installation.html
    How to use similarly to the old InputManager: https://docs.unity3d.com/Packages/com.unity.inputsystem@1.7/manual/Migration.html
     
    Last edited by a moderator: Dec 6, 2023
    Alde-Baran likes this.