Search Unity

Question How can I use the code to get all the axis information of the input settings?

Discussion in 'Editor & General Support' started by Werido, Dec 7, 2020.

  1. Werido

    Werido

    Joined:
    Jan 15, 2017
    Posts:
    7
    Only found a related api, Input.ResetInputAxes, but unfortunately it resets the axes data.


    Does anyone know how to get input settings?

    6.png

    I know Input.GetButtonDown("xxx"), but what I want is to get all the configured button information, so that I can do some related expansions, such as avoiding writing a lot of repetitive code, but only using a loop to solve the problem.

    Thanks for the help of kind people :)
     
  2. Werido

    Werido

    Joined:
    Jan 15, 2017
    Posts:
    7
  3. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,911