private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { // if instance is already set and this is not the same object, destroy it if (this != instance) { Destroy(gameObject); } } TestGenerateFleet(); }
private void Awake() { bartender = GameObject.FindGameObjectWithTag("GameController").GetComponent <TheBartender>(); }
private void Awake() { bartender = GameObject.FindGameObjectWithTag("GameController").GetComponent <TheBartender>(); firstTime = bartender.firstTime; ID = bartender.ID; }