COVID-19 Support:
We’re providing all users three months of complimentary access to Unity Learn Premium, from March 19 to June 20, 2020.
Just log in to start learning.

Lesson 5.3 - Game Over

1 Hour10 Mins
For Educators
We added a great score counter to the game, but there are plenty of other game-changing UI elements that we could add. In this lesson, we will create some “Game Over” text that displays when a “good” target object drops below the sensor. During game over, targets will cease to spawn and the score will be reset. Lastly, we will add a “Restart Game” button that allows the player to restart the game after they have lost.
Project Outcome:
When a “good” target drops below the sensor at the bottom of the screen, the targets will stop spawning and a “Game Over” message will display across the screen. Just underneath the “Game Over” message will be a “Reset Game” button that reboots the game and resets the score, so the player can enjoy it all over again.
Recommended Unity versions
2018.4 and Above
Lesson 5.3 - Game Over