private void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(this); _configs = new List <PlayerConfig>(); } }
private void Awake() { runAnimation = true; if (Instance == null) { Instance = this; DontDestroyOnLoad(this); _configs = new List <PlayerConfig>(); _deadPlayers = new List <PlayerConfig>(); } }
private void Awake() { if (Instance != null) //error checking { if (Instance != this) //deletes the new version of PlayerConfigManager when returning to PLayerSelect after the first time { //TODO: MAKE PLAYERCONFIGMANAGER HAPPEN IN PREVIOUS SCREEN SO THIS IS NOT NEEDED Debug.Log("deleting new instance of PCM"); Destroy(gameObject); } } else { //this allows future scenes to utilize the controllers that are already in Instance = this; DontDestroyOnLoad(Instance); playerConfigs = new List <PlayerConfiguration>(); } }