private void Awake() { if (instance) { DestroyImmediate(gameObject); } else { instance = this; } }
private void Awake() { if (instance) { DestroyImmediate(gameObject); } else { //DontDestroyOnLoad (this.gameObject); instance = this; } }