void OnApplicationQuit()
    {
        var headdof = Pvr_UnitySDKManager.SDK.HeadDofNum == HeadDofNum.SixDof ? 1 : 0;
        var handdof = Pvr_UnitySDKManager.SDK.HandDofNum == HandDofNum.SixDof ? 1 : 0;

        if (controllerlink.neoserviceStarted)
        {
            controllerlink.StopControllerThread(headdof, handdof);
        }
    }
Exemple #2
0
    void OnApplicationQuit()
    {
        var headdof = Pvr_UnitySDKManager.SDK.HmdOnlyrot ? 0 : 1;
        var handdof = Pvr_UnitySDKManager.SDK.ControllerOnlyrot ? 0 : 1;

        if (controllerlink.neoserviceStarted)
        {
            controllerlink.SetUnityVersionToJar(Pvr_UnitySDKAPI.System.UnitySDKVersion);
            controllerlink.StopControllerThread(headdof, handdof);
        }
    }
    void OnApplicationQuit()
    {
        var headdof = Pvr_UnitySDKManager.SDK.HeadDofNum == HeadDofNum.SixDof ? 1 : 0;
        var handdof = Pvr_UnitySDKManager.SDK.HandDofNum == HandDofNum.SixDof ? 1 : 0;

        //仅在CV设备&当前启动CV服务时
        if (controllerlink.cvserviceBindState)
        {
            controllerlink.StopControllerThread(headdof, handdof);
        }
    }
Exemple #4
0
    private void OnApplicationPause(bool pause)
    {
        var headdof = Pvr_UnitySDKManager.SDK.HmdOnlyrot ? 0 : 1;
        var handdof = Pvr_UnitySDKManager.SDK.ControllerOnlyrot ? 0 : 1;

        if (pause)
        {
            if (controllerlink.neoserviceStarted)
            {
                controllerlink.SetGameObjectToJar("");
                controllerlink.StopControllerThread(headdof, handdof);
            }
            if (controllerlink.goblinserviceStarted)
            {
                controllerlink.StopLark2Receiver();
            }
        }
        else
        {
            controllerlink.Controller0 = new ControllerHand();
            controllerlink.Controller1 = new ControllerHand();
            if (controllerlink.neoserviceStarted)
            {
                controllerlink.SetGameObjectToJar(this.gameObject.name);
                controllerlink.SetUnityVersionToJar(Pvr_UnitySDKAPI.System.UnitySDKVersion);
                controllerlink.StartControllerThread(headdof, handdof);
            }
            if (controllerlink.goblinserviceStarted)
            {
                controllerlink.StartLark2Receiver();
                controllerlink.controller0Connected = GetControllerConnectionState(0) == 1;
                controllerlink.controllerType       = controllerlink.GetControllerType();
                controllerlink.handness             = (Pvr_Controller.UserHandNess)controllerlink.getHandness();

                if (PvrServiceStartSuccessEvent != null)
                {
                    PvrServiceStartSuccessEvent();
                }
            }
        }
    }