Hey everybody. I need a bit help with GUI Text. What I want to do is to make GUI text appear after a delay (I want to edit the delay in Inspector). Thanks to who can help.
This should work:
public bool showtext = false;
public float delay;
float Timesincestart = 0f;
void Update ()
{
if(delay > Timesincestart && showtext == false)
{
Timesincestart += Time.deltaTime;
}
if(Timesincestart >= delay)
{
showtext = true;
}
}
void OnGUI()
{
if(showtext == true)
{
GUI.TextField(new Rect(100,100,100,100),"Hello World");
}
}
Probably a better way to do it but should work fine