Beispiel #1
0
 void Awake()
 {
     recentered         = false;
     _clientKit         = FindObjectOfType <ClientKit>();
     _displayController = FindObjectOfType <DisplayController>();
     _vrController      = FindObjectOfType <OsvrUnityNativeVR>();
 }
Beispiel #2
0
        private void SetupUnityXRSupport(Camera camera, bool isEnabled)
        {
            if (isEnabled && _unityNativeVR == null)
            {
                // OSVR doesn't support deferred renderer for now.
                if (camera.renderingPath != RenderingPath.Forward)
                {
                    QualitySettings.antiAliasing = 0;
                }

                _unityNativeVR = camera.gameObject.AddComponent <OsvrUnityNativeVR>();

                // Recenter and mirror mode.
                StartCoroutine(FinishSetup());
            }
            else if (_unityNativeVR != null)
            {
                Destroy <OsvrMirrorDisplay>();
                Destroy <OsvrUnityNativeVR>();
                Destroy <OsvrRenderManager>(false);
                Destroy(_dummyCamera);
                _unityNativeVR = null;
            }
        }
 void Awake()
 {
     _clientKit         = ClientKit.instance;
     _displayController = FindObjectOfType <DisplayController>();
     _vrController      = FindObjectOfType <OsvrUnityNativeVR>();
 }