Example #1
0
    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);
    }
Example #2
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()));
    }
Example #3
0
    public static bool GetUp(GenericVRButton input, Handedness handedness)
    {
        VRButton vrButton = (VRButton)Enum.Parse(typeof(VRButton), handedness.ToString() + input.ToString());

        return(GetUp(vrButton));
    }