Пример #1
0
        public void DestroySession()
        {
            if (!m_IsInitialized && m_IsDestroyed)
            {
                return;
            }
            m_IsDestroyed = true;
#if !UNITY_EDITOR_OSX
            NativeAPI.NativeHeadTracking.Destroy();
            NativeAPI.NativeTracking.Destroy();
            if (VirtualDisplayer != null)
            {
                VirtualDisplayer.Destory();
            }
            if (RenderController != null)
            {
                RenderController.Destroy();
            }
            NRDevice.Instance.Destroy();
#endif
            if (GameObject.FindObjectOfType <NRKernalUpdater>() != null)
            {
                NRKernalUpdater.Instance.OnUpdate -= NRFrame.OnUpdate;
            }
            m_IsInitialized = false;
        }
Пример #2
0
 public void DestroySession()
 {
     if (SessionState == SessionState.Destroyed || SessionState == SessionState.UnInitialized)
     {
         return;
     }
     SessionState = SessionState.Destroyed;
     NRRenderer?.Destroy();
     NativeAPI.NativeHeadTracking.Destroy();
     NativeAPI.NativeTracking.Destroy();
     VirtualDisplayer?.Destory();
     NRDevice.Instance.Destroy();
     FrameCaptureContextFactory.DisposeAllContext();
 }
Пример #3
0
 public void DestroySession()
 {
     if (!m_IsInitialized && m_IsDestroyed)
     {
         return;
     }
     m_IsDestroyed = true;
     NativeAPI.NativeHeadTracking.Destroy();
     NativeAPI.NativeTracking.Destroy();
     VirtualDisplayer?.Destory();
     NRRenderer?.Destroy();
     NRDevice.Instance.Destroy();
     FrameCaptureContextFactory.DisposeAllContext();
     m_IsInitialized = false;
 }