Exemplo n.º 1
0
 void Awake()
 {
     recentered         = false;
     _clientKit         = FindObjectOfType <ClientKit>();
     _displayController = FindObjectOfType <DisplayController>();
     _vrController      = FindObjectOfType <OsvrUnityNativeVR>();
 }
Exemplo n.º 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;
            }
        }
Exemplo n.º 3
0
 void Awake()
 {
     _clientKit         = ClientKit.instance;
     _displayController = FindObjectOfType <DisplayController>();
     _vrController      = FindObjectOfType <OsvrUnityNativeVR>();
 }