Search Unity

Input axis selector

Discussion in 'Scripting' started by AedanCGraves, Feb 21, 2019.

  1. AedanCGraves

    AedanCGraves

    Joined:
    Jan 6, 2016
    Posts:
    14
    Hi all, I'm working on a consolidated fps controller. I'd like to have a dropdown or something in the inspector with all the defined input axis from the input manager and use the selected item in a Input.GetAxis() statement, any idea how I could do something like that?
    Thanks!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    There's a few packages out there that already do this, both for-pay ones on the asset store as well as fully free open source solutions on github. You might wanna check there first, see what you can deduce.

    Genericizing and interoperating with input controllers is both a long-solved and long-running problem dating back to the earliest console days so there's plenty of good prior art.