using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class StepManager : SingletonMono { public Color unfinishColor = Color.black; public Color finishColor = Color.green; public Transform stepNode; protected List stepNameList = new List(); //void Awake() //{ // stepNameList.Clear(); //} // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void FinishStep(string triggerName) { if (triggerName.Trim() == "" || triggerName == null) return; for (int i = 0; i < stepNode.childCount; i++) { TMP_Text tMP_Text = stepNode.GetChild(i).GetComponent(); if (tMP_Text.text.EndsWith(triggerName)) { tMP_Text.color = finishColor; break; } } } }