private void Update() { if (gsession != null) { countdownText.text = gsession.countdown.timeRemaining.ToString(); } else { gsession = FindObjectOfType <GameSessionSingleton>(); } }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
// Start is called before the first frame update void Start() { //gameSingleton = FindObjectOfType<GameStatusSingleton>(); gameSingleton = GameObject.Find("Game Session Singleton").GetComponent <GameSessionSingleton>(); }