I’ve seen the tutorial at : http://answers.unity3d.com/questions/37365/how-would-i-make-a-gui-label-fade-after-a-certain.html
I was wondering if there is anyway to reverse this code so that after a few seconds the gui label fades in ??? Thanks
Using the code from your link:
var color : Color;
function Start()
{
color = Color.white;
color.a = 0;
yield FadeOutAfterTime(3);
}
function OnGUI()
{
GUI.color = color;
GUILayout.Label("Hai!");
// You probably want to restore GUI.Color here
}
function FadeOutAfterTime(time : float)
{
yield WaitForSeconds(time);
yield Fade();
}
function Fade()
{
while (color.a < 1)
{
color.a += Time.deltaTime;
yield;
}
}