private void OnDestroy() { if (!(internalInstance == (this))) { return; } internalInstance = null; }
private void Awake() { if (internalInstance == null) { internalInstance = this; } else { Destroy(this.gameObject); } }