Input.GetKey() joystick selection

Hey, I am defining keys through script and its all working out well, but ihave been looking and i cant figure out how to determine which joystick im determining it for.

how would i make the string; work with something like joystick2 button 1

for example, ill have:

//where the string is joystick button 1

var inputreverse : String;


Input.GetKey(inputreverse){
}

thanks for your help!

1 Answer

1

inputreverse = “joystick 1 button 1”; //for first controller

you can increase to get other controller input like joystick 2 button 1, joystick 3 button 1