Files
2026-02-21 16:46:09 -08:00

23 lines
431 B
C#

using UnityEngine;
using UnityEngine.UI;
namespace LeTai.Asset.TranslucentImage.Demo
{
public class SetText : MonoBehaviour
{
public string format = "0.0";
Text text;
// Use this for initialization
void Awake()
{
text = GetComponent<Text>();
}
public void Set(float value)
{
text.text = value.ToString(format);
}
}
}