protected void Start()
 {
     if (provider.IsConnected())
     {
         deviceInfo = provider.GetDeviceInfo();
         _shouldSetLocalPosition = true;
         LeapVRCameraControl.OnValidCameraParams += onValidCameraParams;
     }
     else
     {
         StartCoroutine(waitForConnection());
         Controller controller = provider.GetLeapController();
         controller.Device += OnDevice;
     }
 }
示例#2
0
 protected void Start()
 {
     if (provider.IsConnected())
     {
         deviceInfo = provider.GetDeviceInfo();
         LeapVRCameraControl.OnValidCameraParams += onValidCameraParams;
         if (deviceInfo.type == LeapDeviceType.Invalid)
         {
             Debug.LogWarning("Invalid Leap Device -> enabled = false");
             enabled = false;
             return;
         }
     }
     else
     {
         Controller controller = provider.GetLeapController();
         controller.Device += OnDevice;
     }
 }
 protected void Start()
 {
     if (provider.IsConnected())
     {
         deviceInfo = provider.GetDeviceInfo();
         _shouldSetLocalPosition = true;
         LeapVRCameraControl.OnValidCameraParams += onValidCameraParams;
         if (deviceInfo.type == LeapDeviceType.Invalid)
         {
             Debug.LogWarning("Invalid Leap Device -> enabled = false");
             enabled = false;
             return;
         }
     }
     else
     {
         StartCoroutine(waitForConnection());
         Controller controller = provider.GetLeapController();
         controller.Device += OnDevice;
     }
 }
        protected void Start()
        {
            //Get a callback right as rendering begins for this frame so we can update the history and warping.
            LeapVRCameraControl.OnValidCameraParams += onValidCameraParams;

            deviceInfo = provider.GetDeviceInfo();
            if (deviceInfo.type == LeapDeviceType.Invalid)
            {
                Debug.LogWarning("Invalid Leap Device -> enabled = false");
                enabled = false;
                return;
            }
        }