using UnityEngine; using UnityEngine.UIElements; public class ScoreManager : MonoBehaviour { public int Score = 0; private Label _scoreLabel; public static System.Action OnScoreChanged; public void AddPoints(int points) { Score += points; UpdateScoreDisplay(); Debug.Log("Score updated: " + Score); } void OnEnable() { var root = GetComponent().rootVisualElement; // Find your Label by name in the UXML _scoreLabel = root.Q