Beispiel #1
0
 void OnDeviceChanged(UnityEngine.InputSystem.InputDevice device, InputDeviceChange change)
 {
     if (change == InputDeviceChange.Added)
     {
         leftTouchController  = (OculusTouchController)OculusTouchController.leftHand;
         rightTouchController = (OculusTouchController)OculusTouchController.rightHand;
         hmd = InputSystem.GetDevice <OculusHMD>();
     }
 }
Beispiel #2
0
        public virtual IEnumerator Start()
        {
            hmd = InputSystem.GetDevice <OculusHMD>();
            leftTouchController  = (OculusTouchController)InputSystem.GetDevice("OculusTouchControllerLeft");
            rightTouchController = (OculusTouchController)InputSystem.GetDevice("OculusTouchControllerRight");
            // inputter = ReInput.players.GetPlayer("Player");
            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            hmd = InputSystem.GetDevice <OculusHMD>();
            leftTouchController  = (OculusTouchController)InputSystem.GetDevice("OculusTouchControllerLeft");
            rightTouchController = (OculusTouchController)InputSystem.GetDevice("OculusTouchControllerRight");
        }