- Home /
fade GUI Texture after GUI Label
Hi folks,
I've this JS, It works perfect, but what I want is to fade a GUITexture in/out and after that, I want a GUILabel fade in/out.
What should I do?
This is my JS: function Start () { yield FadeIn (); yield FadeOut (); }
function FadeIn ()
{
var d = 0.3f / duration;
while (alpha < 1) {alpha += Time.deltaTime * d; yield;}
}
function FadeOut ()
{
var d = 0.3f / duration;
while (alpha > 0) {alpha -= Time.deltaTime * d; yield;}
}
function OnGUI ()
{
GUI.color = Color (1,1,1, alpha);
GUI.DrawTexture (Rect (610, 190, 700, 700), LogoTex);
}
Thanks in advance.
Comment
Your answer
Follow this Question
Related Questions
How to fade in GUI text. 2 Answers
Fading out GUI Label using coroutine problem 2 Answers
Gui Text popup, fade out 1 Answer
Any fade-in/fade-out animations for GUI Text? 3 Answers
My fade coroutine won't work without an empty OnGUI method. 1 Answer