I'd like to using GUI.Label to display information on the screen and then let it disappear after 2 seconds. How can I do that? Thanks a lot.
you can do something like this:
var flag : boolean = false;
function OnGUI(){
if (flag)
GUILayout.Label("label");
if (GUILayout.Button("label"))
EnableGUI();
}
function EnableGUI(){
flag = true;
yield WaitForSeconds(2);
flag = false;
}
I didn't test that, but it should work.