Road TO Dev — Restart! But how?

Rob Smith
2 min readMay 27, 2021
https://iconscout.com/illustration/restart-button-with-cursor-2880394

Ok so now we have our restart function working we need to actually tell our player what to press and when. We do this using the UI. So first let’s create our UI text.

Then we need to set it’s color to what we want I used white and then create the text and size it how we want. Also don’t forget to uncheck the element to disable it as we don’t want it showing until we trigger it.

Setting this up will be a breeze if you did the game over text already as we already have a spot on our UIManager for when the player dies to do something. So we again need to create a handle to the text.

Make sure the text doesn’t show when the game starts.

And we already have a game over method that gets triggered when the player dies so let’s just tuck this in there.

Remember to attach the restart text ui element onto the UIManager

There you have it. We have a working message to our player to tell them to press R if they want to restart.

--

--

Rob Smith

Hi there! I am currently on the path to learn how to become a unity developer and will be documenting my journey as best as I can here. Thanks for looking!