using TMPro; using UnityEngine; public class GatheredText : MonoBehaviour { private TMP_Text _text; private void Awake() { _text = GetComponent(); } private void Start() { GetComponentInParent().OnGatheredChanged += (count) => _text.SetText(count.ToString()); } }