public static bool Get(GenericVRButton input, Handedness handedness) { if (handedness == Handedness.None) { Debug.LogError("Handedness not set"); return(false); } return(Math.Abs(Input.GetAxisRaw(handedness.ToString() + input.ToString())) > 0); }
public static float GetAxisRaw(GenericVRButton input, Handedness handedness) { if (handedness == Handedness.None) { Debug.LogError("Handedness not set"); return(0); } return(Input.GetAxisRaw(handedness.ToString() + input.ToString())); }
public static bool GetUp(GenericVRButton input, Handedness handedness) { VRButton vrButton = (VRButton)Enum.Parse(typeof(VRButton), handedness.ToString() + input.ToString()); return(GetUp(vrButton)); }