Search Unity

[RELEASED] Easy New Input System

Discussion in 'Assets and Asset Store' started by FileThirteen, Oct 13, 2020.

  1. FileThirteen

    FileThirteen

    Joined:
    Oct 23, 2012
    Posts:
    40
    Price: $20
    https://filethirteen.itch.io/input-wrapper-for-unitys-new-input-system


    If you have tried using Unity's new Input System and found it confusing this asset is for you. It essentially wraps the new Input System and allows you to use familiar methods from the old Input Manager such as Input.GetButtonDown, Input.GetButtonUp, and Input.GetAxis, but leverage the new Input System which has some really nice benefits to it.

    This asset is easy to use, you just import it into your project and it will override the default Input class making for 0 code changes. The only thing you have to do is configure an Input Action Asset to match your current input settings in the Input Manager.

    Easy to use:


    It comes with examples as well:


    It really just makes using the new Input System so much easier. It helps you clean up your code so you don't have to have action callback methods or keep track of booleans when something is pressed, and reset the booleans when you want to reset the action (usually at the end of the Update or FixedUpdate, wherever you are "consuming" that input).

    Example Code:


    This asset is great for 3 use cases:
    - Update a project using the old Input Manager to use the new Input System with no code change
    - Start a new project using the new Input System while writing code that is functionally identical to the old Input Manager for easy transitioning
    - Update a project using the new Input System allowing you to fix up any scripts that are using input to simplify them so you don't have to use the PlayerInput Component, don't have to generate a C# file to hook into, don't have to write any Action Callback Methods, and don't have to keep track of booleans and state of each button manually.

    Using your own Input Action Asset is as simple as opening Edit > Input Wrapper Settings and setting your asset in the settings window:


    I tried to make this available on the Asset store but it was declined because it was deemed too similar to many other Input System assets. I looked through all 500+ assets that came up under the search term Input and I couldn't find anything that looked like this so here it is!
     
    Lars-Steenhoff likes this.
  2. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Looks very useful!

    I think I will be brave enough to throw $20 to it when :
    1. It'd avoid using strings, and generates a C# class instead for strongly typed actions.
    2. It'd be sold at the Asset Store. (Sorry, but its safer still, and more integrated)

    And I would suggest changing the name into something more distinct. Perhaps the name is too close with Unity's own "New Input System". This has tons of potential, good luck!
     
  3. FileThirteen

    FileThirteen

    Joined:
    Oct 23, 2012
    Posts:
    40
    Thanks for the reply. I am still trying to push it through the Unity Asset Store. I am really not sure what a better name for it would be just because that really does distill it down to it's base of exactly what it is. Any suggestions are welcome in that regard.

    Originally I had it using the Action on the Input Action Asset directly instead of the string, however due to wanting it to be generic and not require any code changes on the consumer side I had to switch to using the get action by string name instead, the original way was a bit more work to consume but it required using the generate C# option on the Input Action Asset that is provided by Unity, then hooking that into the script which allowed you to refer to the generated C# classes Actions Directly.

    I'll be honest I'm not even sure how to go about the first part of generating my own C# class for strongly typed actions. This whole thing just builds on top of the new Input System rather than coming up with my own.
     
  4. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Still not accepted by the Asset Store? Can't wait to try it!

    Seamless migration is great and all, but I think you should still separate the Input class name into something else different than Unity's own old Input manager. That way users can still differentiate or use both if necessary.

    The reason for the rejection might even be because of the asset name being too close to the new input package.

    I will try provide a few names for examples :
    - EZ Input Wrapper (Easy)
    - SS Input Wrapper (Short Simple)
    - AB Input (Elementary)
    - Inputin (Charismatic)
    - Al Input (As in Aluminium Wrapper)
    - Bolt Input (Quick and flashy!)
    - LZ Input (Lazy)
    - Wrap Up! Input Wrapper
    - X Input (Helps you crossover new input complexity with the old input simplicity)
     
    Last edited: Oct 21, 2020
  5. FileThirteen

    FileThirteen

    Joined:
    Oct 23, 2012
    Posts:
    40
    I did finally get word back from support and have resubmitted and I got my feedback. They don't like the images associated with it, nothing about the name but yeah it was something I thought about a bunch. The problem is it's not like I created a new input system like pretty much all the other input related assets. I just wrote a wrapper for theirs, that lets you use it with ease, thus Easy New Input System, it seems a little too simple but unfortunately that's all there is to it lol. I feel like New Input System Wrapper is a good one, also I'm pretty sure a lot of those are taken already.

    Also you can still use the old Input System along side this one. I actually have Examples in the project that show just that. Thanks for the feedback and ideas. I'm still pushing forward. Hopefully it's just because my crappy pictures and with a proper redesign they will accept it.

    I really feel if I can market this on the new Input System forum itself that a lot of people there would be interested in it. Honestly it just makes leveraging the new system so much easier, but obviously it does have it's caveats. It certainly won't work for Input.GetKey, I figured the juice is not worth the squeeze on that one since the KeyCodes of old and the KeyControls of new don't mesh well, I would have to come up with a huge map of what maps to what, and most people shouldn't be leaning on the GetKey/GetKeyDown/GetKeyUp stuff. If that's the case they can of course leverage the new Input System's version of that by polling the Keyboard directly. Some other caveats are that it doesn't support specialized Actions such as Hold, MultiTap, and so on. It really is meant to allow a seamless transition between the old and new system and if you need advanced set up it can sort of help guide you on how you might do that, if you just look at how it's implemented.
     
  6. FileThirteen

    FileThirteen

    Joined:
    Oct 23, 2012
    Posts:
    40