using System; using UnityEngine; [ExecuteInEditMode] [RequireComponent(typeof(UIWidget))] public class AnimatedColor : MonoBehaviour { private void OnEnable() { this.mWidget = base.GetComponent(); this.LateUpdate(); } private void LateUpdate() { this.mWidget.color = this.color; } public Color color = Color.white; private UIWidget mWidget; }