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