using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TextItem : MonoBehaviour { // Start is called before the first frame update string text = ""; public Text textObj; public void updateText(string text) { textObj.text = text; this.text = text; } }