Beispiel #1
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 #2
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
        }