Beispiel #1
0
        public void DestroyGlassesController()
        {
#if !UNITY_EDITOR
            m_NativeGlassesController?.Stop();
            m_NativeGlassesController?.Destroy();
            m_NativeGlassesController = null;
#endif
        }
Beispiel #2
0
        private void DestroyGlassesController()
        {
            if (isGlassesPlugOut)
            {
                return;
            }
#if !UNITY_EDITOR
            lock (m_Lock)
            {
                m_NativeGlassesController?.Stop();
                m_NativeGlassesController?.Destroy();
                m_NativeGlassesController = null;
            }
#endif
        }
Beispiel #3
0
        public void CreateGlassesController()
        {
#if !UNITY_EDITOR
            this.Init();
            if (m_NativeGlassesController != null)
            {
                return;
            }
            try
            {
                m_NativeGlassesController = new NativeGlassesController();
                m_NativeGlassesController.Create();
                m_NativeGlassesController.RegisGlassesWearCallBack(OnGlassesWear, 1);
                m_NativeGlassesController.RegisGlassesPlugOutCallBack(OnGlassesPlugOut, 1);
                m_NativeGlassesController.Start();
            }
            catch (Exception)
            {
                throw;
            }
#endif
        }
Beispiel #4
0
        private void CreateGlassesController()
        {
            if (isGlassesPlugOut)
            {
                return;
            }
#if !UNITY_EDITOR
            try
            {
                lock (m_Lock)
                {
                    m_NativeGlassesController = new NativeGlassesController();
                    m_NativeGlassesController.Create();
                    m_NativeGlassesController.RegisGlassesWearCallBack(OnGlassesWear, 1);
                    m_NativeGlassesController.RegistGlassesEventCallBack(OnGlassesDisconnectEvent);
                    m_NativeGlassesController.Start();
                }
            }
            catch (Exception)
            {
                throw;
            }
#endif
        }