- Home /
Timer Between Labels
Hi, I have a GUI Label and it has a fade-out effect. I want to give the first label time to fade before the second label comes up. How would I create a timer to do so?
Answer by Orion 1 · Dec 10, 2010 at 02:21 PM
There's multiple ways to achieve this, but it really depends on your fading.
- How do you make your GUI label fade out?
- What initiates the fading?
- When you say GUI label, do you mean GUIText?
- How do you make it fade?
Most likely you can use an animation that animates the fading for both labels.
Or you can use a simple script (assuming you call a function to start the fading). Here's some JS semi-pseudo code:
var label1 : Label; var label2 : Label;
function Start() { label1.Fade(); yield WaitForSeconds(2); label2.Fade(); }
Answer by Yanger_xy · Mar 28, 2011 at 02:12 PM
I think this is what you want.link text
And if you want a flash Label or some other control, you can write like this:
private void OnGUI()
{
if (Time.time % 2 < 1)
{
if (GUI.Button (new Rect (10,10,200,20), "Meet the flashing button"))
{
print ("You clicked me!");
}
}
}
GOOD LUCK!
Your answer
Follow this Question
Related Questions
How Would I Make A GUI Label Fade After A Certain Amount Of Time? 1 Answer
Setting Scroll View Width GUILayout 1 Answer
For Loop GUILayout.Label Problems 1 Answer
Fade multiple GuiTextures in ONE Javascript 1 Answer
Digit problem 1 Answer