using System; using TMPro; using UnityEngine; using UnityEngine.UI; public class Die : MonoBehaviour { private int _result = 0; public void SetResult(int result) { _result = result; gameObject.GetComponentInChildren().text = _result.ToString(); } public void ClearDie() { gameObject.GetComponent().text = String.Empty; } }