void Awake() { if(instance == null){ instance = this; GameObject.DontDestroyOnLoad(this.gameObject); } else { Destroy (gameObject); } }
void Awake() { if (instance == null) { instance = this; GameObject.DontDestroyOnLoad(this.gameObject); } else { Destroy(gameObject); } }