void OnDestroy() { if (_instance == this) { _instance = null; } }
void Awake() { if (_instance == null) { _instance = this; } if (_instance != this) { Log.w(LOG_TAG, "Has another [WaveVR] object in a scene. Destory this."); Destroy(this); return; } if (WaveVR.Instance.Initialized) { Log.i(LOG_TAG, "Initialized"); } }
void Awake() { if (_instance == null) { _instance = this; } if (_instance != this) { Log.w(LOG_TAG, "Has another [WaveVR] object in a scene. Destory this."); Destroy(this); return; } #if UNITY_EDITOR if (Application.isEditor) { return; } #endif if (WaveVR.Instance != null) { Log.d(LOG_TAG, "Initialized"); } }