Isaac Adni Isaac Adni - 11 months ago 138
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.

Answer Source

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