Files
AZTECH_WB/Assets/Scripts/UI/UI_SimulationInfoItem.cs
2026-01-16 09:23:25 +09:00

36 lines
787 B
C#

using TMPro;
using UnityEngine;
namespace AZTECHWB
{
public class UI_SimulationInfoItem : MonoBehaviour
{
public TMP_Text InfoName;
public TMP_Text Data;
public void Init()
{
var textDict = transform.GetChildComponentsByName<TextMeshProUGUI>();
InfoName = textDict.GetOrNull(nameof(InfoName));
Data = textDict.GetOrNull(nameof(Data));
}
public void Setting(string tag, string info)
{
InfoName.text = tag;
if (info == string.Empty || info == null)
{
Data.SetText("-");
}
else
{
Data.SetText(info);
}
transform.localScale = Vector3.one;
}
}
}