What is Unity Button ID
Hello I worked now over a few years with unity but i have no idea what the unity button ID is. I try to port a old VR project and use the new integrated unity input mapping https://docs.unity3d.com/Manual/OpenVRControllers.html some of the VR-inputs need the unity button ID and i have no idea how to use them. I test it in the input manager. I use the ID as klicked button (ID 1 = button one) but this dosn't work. Also Input.GetButton(ID) do not work. Can somebody help me?
kind regards
chris elvis
Answer by menderbug · May 14, 2018 at 08:48 AM
I ran into the same issue today. I hope you've figure it out by now, but for anyone finding this post in the future:
For buttons, you set the type in the input manager to "Key or Mouse Button" and enter the button ID into the positive/negative button field as joystick button 1
etc. If you want a specific "joystick" (instead of responding to any joystick), you can enter its ID after joystick
, e.g. joystick 2 button 1
.
For axes, you set the type to "Joystick Axis" and select the correct axis ID from the Axis dropdown. Note that axes #1 and #2 are just labelled as X and Y in that dropdown menu.
Your answer
