using System; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; namespace Ichni.Editor { public class DynamicUIText : DynamicUIElement { public TMP_Text text; public override void Initialize(string title, string parameterName) { base.Initialize(title, parameterName); text.text = connectedGameElement.GetType().GetField(parameterName).GetValue(connectedGameElement).ToString(); } private void Update() { if (isAlwaysUpdated) { text.text = connectedGameElement.GetType().GetField(parameterName).GetValue(connectedGameElement).ToString(); } } } }