Skip to content

Instantly share code, notes, and snippets.

@Lkledu
Created February 13, 2020 23:47
Show Gist options
  • Save Lkledu/ae2e03f63c707dd041cc2a5c340296ad to your computer and use it in GitHub Desktop.
Save Lkledu/ae2e03f63c707dd041cc2a5c340296ad to your computer and use it in GitHub Desktop.
blink text color
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class blinkText : MonoBehaviour
{
Text txt;
void Start(){
txt = GetComponent<Text>();
}
void Update()
{
txt.color = Color.Lerp(Color.white, Color.black, Mathf.PingPong(Time.time, 0.5f));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment