Retro Style Game Over Screen

Today I will show you how to make a blinking Game Over Screen. This will be done using coroutines.

Create a script and attach it to the Canvas that the Game Over text is parented to.

In the script create a serialized field to hold the text as a game object and a bool to check if the game is over.

Create an IEnumerator and create a while loop to enable and disable the Game over text while game over is true.

Now create a method to call the coroutine in.

Now call that method where ever you are setting the game over condition (Player Lives). Make sure you set game over to true when the game over conditions are met. For this example I am calling it in the start method.

Now when the game over is set to true the flicker game over screen will run.

Make sure that you have the game over text disabled in the hierarchy by default

Unity Game Developer and C# Programmer