Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Alternative InputActionAsset C# Wrapper

Discussion in 'Input System' started by Fenrisul, Apr 18, 2020.

  1. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    618
    Hey all, I've been ... wrapping... my head around the new InputSystem!

    I'm sharing the alternative C# Wrapper Generator that does some interesting things... The important bits are:
    • Support for PlayerInput / PlayerInputManager (Local Multiplayer)
    • Strongly Typed (not action.ReadValue<T>();
    • In-line accessors similar to the old InputManager (ie: input.Jump.WasPressed)
    • Rebinding a different way, and with serialization to disk via JSON. (Not supported for Console / Android / WebGL, will use PlayerPrefs in the future for this).


    Super open to feedback / comments / suggestions! :)
    (UnityPackage attached)
     

    Attached Files:

    Roboserg, elZach and Rene-Damm like this.
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Great stuff.

    When we have another go over the C# generator code, might be we end up stealing some of your ideas :)
     
    Roboserg likes this.
  3. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    618
    Thanks :) And get it done! :D Good luck getting to 1.0!