using UnityEngine; using UnityEngine.UIElements; /// /// Controls the game UI, updating score and timer displays. /// [RequireComponent(typeof(UIDocument))] public class UIController : MonoBehaviour { private UIDocument uiDocument; // UI Elements private Label homeTeamLabel; private Label homeScoreLabel; private Label awayTeamLabel; private Label awayScoreLabel; private Label timerLabel; private Label periodLabel; [Header("Team Names")] [SerializeField] private string homeTeamName = "Home Team"; [SerializeField] private string awayTeamName = "Away Team"; void Awake() { uiDocument = GetComponent(); } void OnEnable() { // Get root visual element var root = uiDocument.rootVisualElement; // Query UI elements homeTeamLabel = root.Q