void OnDestroy() { if (this == instance) { instance = null; } }
void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }