private void OnDestroy() { if (instance == this) { instance = null; } }
private void Awake() { if (instance != null) { Destroy(this); return; } instance = this; }