Search Unity

Runtime configurable maps?

Discussion in 'Input System' started by mikewarren, Jan 29, 2019.

  1. mikewarren

    mikewarren

    Joined:
    Apr 21, 2014
    Posts:
    109
    I just started looking at the new input system, so I apologize if the answer is in the documentation and I just haven't found it yet.

    I was wondering if there's a way to dynamically remap inputs at run time based on an individual's preferences. For instance, remapping axes and buttons for handedness or personal preference. Or, adding support (post player build) for a new device.

    We implemented something similar to the Input Manager with support for run time device/input definition through XML files, but I'd like to work within the new input system going forward.

    Mike
     
    Last edited: Jan 30, 2019
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    The ApplyBindingOverride() family of extension methods is meant to deal with that. Basically, each binding has an optional, non-destructive override path. In the future, we'll have some nicer wrappers around all this so that you can get and set overrides in bulk and easily load and store them.

    The various tests for the overriding stuff may be useful to look at (such as Actions_CanOverrideBindings).

    The device layout system has support for a JSON format. Technically, as long as the data is surfacing, you can add layouts in JSON format at runtime to turn that data into devices.

    We've not yet taken this super far. There's plans to make adding new device support post-deploy both on the native and on the managed side a thing. Still a couple steps to taken but it's headed there.
     
  3. mikewarren

    mikewarren

    Joined:
    Apr 21, 2014
    Posts:
    109
    Thank you for the update. I'm pleased that you're considering post deploy support for customization.
    .
    I'd also like to suggest adding support for TrackD (Mechdyne) and VRPN natively. VRPN was included as part of cluster rendering at one time, but the last I checked, it only worked if you were running in cluster mode.