I have got a GUI-Window I want to destroy after 3 seconds...how do I do that?
I already have a timer function in the same script or other purposes....is that ok?
Thanks.
I have got a GUI-Window I want to destroy after 3 seconds...how do I do that?
I already have a timer function in the same script or other purposes....is that ok?
Thanks.
You don't really destroy windows, you just stop calling the function
Basically - set a bool to true when you want to show it, and false when you want to hide it
Then it's just a case of doing something like
if (myBool)
{
GUI.Window(stuff);
}
Edit for your timer stuff - call this function instead of setting the bool to true:
function WindowTimer()
{
myBool = true;
yield WaitForSeconds(3);
myBool = false;
}