28 lines
840 B
C#
28 lines
840 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Ichni.RhythmGame;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.Editor
|
|
{
|
|
public class DynamicUIParameterText : DynamicUIElement
|
|
{
|
|
public TMP_Text text;
|
|
|
|
public override void Initialize(IBaseElement baseElement, string title, string parameterName)
|
|
{
|
|
base.Initialize(baseElement, title, parameterName);
|
|
text.text = connectedBaseElement.GetType().GetField(parameterName).GetValue(connectedBaseElement).ToString();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (isAlwaysUpdated)
|
|
{
|
|
text.text = connectedBaseElement.GetType().GetField(parameterName).GetValue(connectedBaseElement).ToString();
|
|
}
|
|
}
|
|
}
|
|
} |