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