public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { EditorGUI.BeginChangeCheck(); Gamepad.Button key = (Gamepad.Button)EditorGUI.EnumPopup(position, label, (Gamepad.Button)property.intValue); if (EditorGUI.EndChangeCheck()) { property.intValue = (int)key; } }
void Check(Gamepad.Button button, Text text) { if (text == null) { return; } if (Gamepad.JustDown(button)) { text.color = Color.yellow; } else if (Gamepad.Down(button)) { text.color = Color.white; } else { text.color = Color.grey; } }
public static bool GetUp(AirVRCameraRig cameraRig, Gamepad.Button button) { return(GetButtonUp(cameraRig, AirVRInputDeviceName.Gamepad, Gamepad.ParseControlID(button))); }