Display text and images at a specific time

Can someone explain how I would have text appear at a certain time during the game? I would also like to have an image appear at a specific time as well. To explain what I need this for, at the beginning of each level in the game, I would like rules for that level to be displayed on an overlay so to speak. Then the overlay image and text will disappear and the level will begin. What is the simplest way to accomplish this? I am using the GUI Text gameobject to display the text.

It is pretty simple. I really don’t use coroutines to handle that I use simple counters and check it’s time on Update method.

Check this out:

private float _counter = 0;
private bool _showText = false;

void Update()
{
    //counter is increasing by deltaTime till to reach the trigger time
    _counter += Time.deltaTime;

    //after or equals 5 sec. show a simple GUIText
    if (_counter >= 5 && !_showText)
    {
        _showText = true;
    }
        
}

void OnGUI()
{
    //is ready to show the label?
    if (_showText)
    {
        var style = new GUIStyle {fontSize = 48, fontStyle = FontStyle.Bold};
        GUI.Label(new Rect(100, 100, 300, 100), "After 5s I'll like you!", style);
    }
}

This next sample shows a blink text on the screen:

private float _counter = 0;
private float _blinkTime = 0;
private bool _blink = false;

void Update()
{
    //counter is increasing by deltaTime till to reach the trigger time
    _counter += Time.deltaTime;

    //each 1/10 sec passed blink the text
    if (_counter >= 0.1f)
    {
        //show text during 1/10 sec.
        _blink = true;
        _blinkTime += Time.deltaTime;

        if (_blinkTime >= 0.1f)
        {
            //reset time and text hides away
            _counter = 0;
            _blinkTime = 0;
            _blink = false;
        }
    }
        
}

void OnGUI()
{
    if (_blink)
    {
        var style = new GUIStyle {fontSize = 32, fontStyle = FontStyle.Bold};
        GUI.Label(new Rect(100, 100, 300, 100), "Blink Time!", style);
    }
}