private void Awake() { if (GameObject.FindGameObjectsWithTag("Dungeon Master").Length > 1) { Destroy(this.gameObject); } progress = GetComponent <PlayerProg>(); DontDestroyOnLoad(this.gameObject); }
private void Awake() { prog = GameObject.FindGameObjectWithTag("Dungeon Master").GetComponent <PlayerProg>(); levelManager = GameObject.FindGameObjectWithTag("Dungeon Master").GetComponent <LevelManager>(); optionsManager = GameObject.FindGameObjectWithTag("Dungeon Master").GetComponent <OptionsManager>(); }