19 lines
443 B
C#
19 lines
443 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class TextColorManager : MonoBehaviour
|
|
{
|
|
private TextMeshProUGUI _text;
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Start()
|
|
{
|
|
_text = GetComponent<TextMeshProUGUI>();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
_text.color = Color.HSVToRGB(Mathf.PingPong(Time.time, 1f), 1f, 1f);
|
|
}
|
|
}
|