void Awake() { if (current == null) { current = this; } else if (current != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
void Awake() { if (current == null) current = this; else if (current != this) Destroy (gameObject); DontDestroyOnLoad (gameObject); }