void Awake() { if (instance == null) { instance = this; cm = new ControllerManager(); } else if (instance != this) { Destroy(gameObject); } players = GameObject.FindObjectsOfType <PlayerControl>(); }
void Awake() { if (instance == null) { instance = this; cm = new ControllerManager(); DontDestroyOnLoad(this.gameObject); } else if (instance != this) { Destroy(gameObject); } if (Assets.Scripts.Data.RoundHandler.Instance == null) { players = GameObject.FindObjectsOfType <PlayerControl>(); } else { players = Assets.Scripts.Data.RoundHandler.Instance.PlayerControl(); } }