Pausing the game

Now that we have started on our main menu, let's add some additional GUI functionality to our game, adding in the ability to pause our game and restart it. However, before we do that, let's take a look at some stuff we can do to make our lives easier when it comes to customization:

  1. We also want to make these buttons have the same appearance as the stuff we've done previously. So I'm going to create a Prefab of one of our buttons so we can create them easily in the future. So with that in mind, select our Start Game button and duplicate it by pressing Ctrl + D and renaming our previous one Start Game.
  2. We don't want every single button we create to load the gameplay level, so click on the outside part of the On Click () property, ...

Get Unity 5: Learning C# by Developing Games now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.