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(); }
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; }