23 lines
410 B
C#
23 lines
410 B
C#
using UnityEngine;
|
|
using TMPro;
|
|
using RTG;
|
|
|
|
public class Panel_Grid : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
TMP_Text text;
|
|
private void Awake()
|
|
{
|
|
text = gameObject.GetComponent<TMP_Text>();
|
|
}
|
|
void Start()
|
|
{
|
|
FindAnyObjectByType<RTSceneGrid>().onAccumulationUpdated += UpateText;
|
|
}
|
|
|
|
void UpateText(float value)
|
|
{
|
|
text.text = $"grid : {value}M";
|
|
}
|
|
}
|