public void CreateHMD() { #if !UNITY_EDITOR this.Init(); if (m_NativeHMD != null) { return; } m_NativeHMD = new NativeHMD(); m_NativeHMD.Create(); #endif }
private void CreateHMD() { if (isGlassesPlugOut) { return; } #if !UNITY_EDITOR lock (m_Lock) { m_NativeHMD = new NativeHMD(); m_NativeHMD.Create(); } #endif }
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; }