using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class NeonTextAnimation : MonoBehaviour { public TextMeshProUGUI text; public Color color1 = new Color(0.8f, 0f, 1f); public Color color2 = new Color(0f, 0.8f, 1f); public float speed = 1f; void Update() { float t = (Mathf.Sin(Time.time * speed) + 1f) * 0.5f; text.color = Color.Lerp(color1, color2, t); } }