using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class SkillTreeInfoDisplay : MonoBehaviour { public GameObject displayPfb; public TextMeshProUGUI displayName; public TextMeshProUGUI description; // public TextMeshProUGUI effectTxt; public TextMeshProUGUI priceTxt; // Start is called before the first frame update void Start() { displayPfb = this.gameObject; displayName = displayPfb.GetComponentsInChildren()[0]; description = displayPfb.GetComponentsInChildren()[1]; // effectTxt = displayPfb.GetComponentsInChildren()[3]; priceTxt = displayPfb.GetComponentsInChildren()[2]; } public void RemoveData(){ displayName.text = ""; description.text = ""; // effectTxt.text = ""; priceTxt.text = ""; } public void DisplayData(SkillTreeItem _data){ displayName.text = _data.DisplayName; description.text = _data.Description; // effectTxt.text = ""; // foreach(SkillTreeEffect effect in _data.Effects){ // effectTxt.text += "" + effect.Stat; // } priceTxt.text = "" + _data.Price; } }