コード例 #1
0
        private WebXRControllerHand handFromString(string handValue)
        {
            WebXRControllerHand handParsed = WebXRControllerHand.NONE;

            if (!String.IsNullOrEmpty(handValue))
            {
                try
                {
                    handParsed = (WebXRControllerHand)Enum.Parse(typeof(WebXRControllerHand), handValue.ToUpper(), true);
                }
                catch
                {
                    Debug.LogError("Unrecognized controller Hand '" + handValue + "'!");
                }
            }
            return(handParsed);
        }
コード例 #2
0
        public void HapticPulse(WebXRControllerHand hand, float intensity, float duration)
        {
#if UNITY_WEBGL
            Native.ControllerPulse((int)hand, intensity, duration);
#endif
        }
コード例 #3
0
 public void HapticPulse(WebXRControllerHand hand, float intensity, float duration)
 {
     Native.ControllerPulse((int)hand, intensity, duration);
 }