21 lines
420 B
C#
21 lines
420 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
|
|
namespace DefaultNamespace
|
|
{
|
|
[RequireComponent(typeof(TextMeshProUGUI))]
|
|
public class TimeLabel : MonoBehaviour
|
|
{
|
|
private TextMeshProUGUI _text;
|
|
|
|
private void Awake()
|
|
{
|
|
_text = GetComponent<TextMeshProUGUI>();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
_text.text = Time.time.ToString("0.00");
|
|
}
|
|
}
|
|
} |