using System; using TMPro; using UnityEngine; [RequireComponent(typeof(TMP_Text))] public class DebugGrabbingDisplay : MonoBehaviour { public PlayerControl playerControl; private TMP_Text _text; private void Awake() { _text = GetComponent(); } private void Update() { _text.text = playerControl.grabbing ? "Grabbing" : "Not Grabbing"; } }