Hi,
couldn’t find it anywhere, so I’m asking you experts here:
how can I postpone a start of the OnGUI function since yield WaitForSeconds can’t be used in an OnGUI function?
I want that my OnGUI function starts 3 seconds after start.
/* Example level loader */
var style1 : GUIStyle;
function OnGUI () {
// Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
if (GUI.Button (Rect (120,390,180,50), "Level 1", style1)) {
Application.LoadLevel (1);
}
// Make the second button.
if (GUI.Button (Rect (120,470,180,50), "Level 2", style1)) {
Application.LoadLevel (2);
}
}
thanks!