/// <summary>
        /// Returns true if the trigger value is greater than threstholdValue
        /// </summary>
        /// <param name="device"></param>
        /// <param name="threstholdValue"></param>
        /// <returns></returns>
        public static bool GetTriggerButtonDown(InputDevice device, float threstholdValue)
        {
            var value = XRInputDevicesUsage.GetTrigger(device);

            if (value >= threstholdValue && !_previousTriggerLaunched)
            {
                _previousTriggerLaunched = true;
                return(true);
            }

            return(false);
        }
        /// <summary>
        /// Returns true if the user release the TriggerButton
        /// </summary>
        /// <param name="device"></param>
        /// <returns></returns>
        public static bool GetTriggerButtonUp(InputDevice device)
        {
            var value = XRInputDevicesUsage.GetTriggerButton(device);

            if (!value && _previousTriggerButton)
            {
                _previousTriggerButton = false;
                return(true);
            }

            return(false);
        }
        public static bool GetSecondary2DAxisClickDown(InputDevice device)
        {
            var value = XRInputDevicesUsage.GetSecondary2DAxisClick(device);

            if (value && !_previousSecondary2DAxisClick)
            {
                _previousSecondary2DAxisClick = true;
                return(true);
            }

            return(false);
        }
        public static bool GetSecondary2DAxisTouchUp(InputDevice device)
        {
            var value = XRInputDevicesUsage.GetSecondary2DAxisTouch(device);

            if (!value && _previousSecondary2DAxisTouch)
            {
                _previousSecondary2DAxisTouch = false;
                return(true);
            }

            return(false);
        }
        public static bool GetSecondaryTouchDown(InputDevice device)
        {
            var value = XRInputDevicesUsage.GetSecondaryTouch(device);

            if (value && !_previousSecondaryTouch)
            {
                _previousSecondaryTouch = true;
                return(true);
            }

            return(false);
        }
        public static bool GetPrimary2DAxisClickUp(InputDevice device)
        {
            var value = XRInputDevicesUsage.GetPrimary2DAxisClick(device);

            if (!value && _previousPrimary2DAxisClick)
            {
                _previousPrimary2DAxisClick = false;
                return(true);
            }

            return(false);
        }
        public static bool GetPrimaryTouchUp(InputDevice device)
        {
            var value = XRInputDevicesUsage.GetPrimaryTouch(device);

            if (!value && _previousPrimaryTouch)
            {
                _previousPrimaryTouch = false;
                return(true);
            }

            return(false);
        }
        public static bool GetPrimaryButtonDown(InputDevice device)
        {
            var value = XRInputDevicesUsage.GetPrimaryButton(device);

            if (value && !_previousPrimaryButton)
            {
                _previousPrimaryButton = true;
                return(true);
            }

            return(false);
        }
        /// <summary>
        /// Returns true if the trigger value is lower than threstholdValue
        /// </summary>
        /// <param name="device"></param>
        /// <param name="threstholdValue"></param>
        /// <returns></returns>
        public static bool GetGripButtonUp(InputDevice device, float threstholdValue)
        {
            var value = XRInputDevicesUsage.GetGrip(device);

            if (value <= threstholdValue && _previousGripLaunched)
            {
                _previousGripLaunched = false;
                return(true);
            }

            return(false);
        }