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