using UnityEngine; using UnityEngine.UI; public class YiZhuDan : MonoBehaviour { Text[] input; private void Awake() { input = GetComponentsInChildren(); } private void OnEnable() { for (int i = 0; i < input.Length; i++) { input[i].text = string.Empty; } } public void SetTxt(string s,int i = 0) { input[i].text = s; } }