protected virtual void OnDestroy() { if (mInstance == this) { Exists = false; mInstance = null; } }
protected virtual void Awake() { if (mInstance != null) { Destroy(this.gameObject); return; } else { Exists = false; } mInstance = this; Exists = true; DontDestroyOnLoad(this); mIsInit = true; }