Isaac Adni Isaac Adni - 5 months ago 82
C# Question

Fade out Unity UI text

When I run the following code on my UI text

Color color = text.color;
color.a -= 1.0f;
text.color = color;

The alpha value of the text is immediately set to 0. How can I simply fade out the text.


Use Color.Lerp (text.color, Color.clear, fadeSpeed * Time.deltaTime);