Example #1
0
        public void CreateHMD()
        {
#if !UNITY_EDITOR
            this.Init();
            if (m_NativeHMD != null)
            {
                return;
            }
            m_NativeHMD = new NativeHMD();
            m_NativeHMD.Create();
#endif
        }
Example #2
0
        private void CreateHMD()
        {
            if (isGlassesPlugOut)
            {
                return;
            }
#if !UNITY_EDITOR
            lock (m_Lock)
            {
                m_NativeHMD = new NativeHMD();
                m_NativeHMD.Create();
            }
#endif
        }
Example #3
0
        public void Init()
        {
            if (m_IsInit)
            {
                return;
            }

#if UNITY_ANDROID && !UNITY_EDITOR
            // Init before all actions.
            AndroidJavaClass cls_UnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
            m_UnityActivity = cls_UnityPlayer.GetStatic <AndroidJavaObject>("currentActivity");
            NativeApi.NRSDKInitSetAndroidActivity(m_UnityActivity.GetRawObject());

            NativeHMD = new NativeHMD();
            NativeHMD.Create();
#endif
            m_IsInit = true;
        }