using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TextLogCheck : MonoBehaviour { public GameObject center; public TaskManager tm; private void OnDisable() { center.SetActive(true); } private void OnEnable() { center.SetActive(false); Text t = this.GetComponent(); for (int i = 0; i < tm.tconfigs.Count; i++) { if(i<=tm.nowTaskCt) { for (int j = 0; j < tm.tconfigs[i].TaskList.Count; j++) { if (i < tm.nowTaskCt) { if(!tm.tconfigs[i].TaskList[j].isNoshow) { if (tm.iidex == 1 && tm.tconfigs[i].TaskList[j].info2 != "") t.text += "\n" + tm.tconfigs[i].TaskList[j].info2 + "\n"; else { t.text += "\n" + tm.tconfigs[i].TaskList[j].info + "\n"; } } } else if(j<=tm.nowTaskIndex) { if (!tm.tconfigs[i].TaskList[j].isNoshow) { if (tm.iidex == 1 && tm.tconfigs[i].TaskList[j].info2 != "") t.text += "\n" + tm.tconfigs[i].TaskList[j].info2 + "\n"; else { t.text += "\n" + tm.tconfigs[i].TaskList[j].info + "\n"; } } } } } } } }