using UnityEngine; public class WaveIndicator : MonoBehaviour { GameState gameState; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { gameState = GameObject.FindGameObjectWithTag("GameController").GetComponent(); } // Update is called once per frame void Update() { GetComponent().text = "Wave: "+gameState.wave; } }