Journal 146 — Unity Project Development, 2.5D Shooter

Objective: Add Pause, Restart, and Continue Menu

Over the past couple weeks, I have been working on various improvements to my project. In this article, I want to go over how I added a pause menu in game in order to be able to restart and continue the game.

Pause Menu

I’ll start with a new UI panel in the main UI Canvas and I will set this active and inactive based on button selections to restart and continue.

I’ll first have the Pause menu inactive and then only by pressing the “P” key will the Pause menu show.

I’ll add a new key command for pause to my PlayerActions.

In my GameManager script, I will check the playerInput if they press the Pause key, then set the Pause menu active, and pause the game.

Pausing the game is pretty straightforward in Unity, by setting the time scale to 0 or 1. Note this only works with movement for example that uses Time.deltaTime. Also, we want to set the AudioListener to be paused true or false. See this article for additional background.

In the UI Manager, I can handle the OnClick() button events to restart and continue the game, and also set the pause menu active and inactive.


To restart, I’ll need to do a few things besides just reloading the active scene:

  • Clear the enemy movement waypoints
  • Do not destroy the UI Canvas
  • Make sure the Pause menu is set back to inactive.
  • Restore the Time.timeScale.


To continue the game, I will simply set the timeScale to 0 and pause the audio, then when the continue button is pressed, set the timeScale back to 1 and unpause the audio, and set the pause menu back to inactive.

Now, let’s see the results.

Thank you for your time!

I still have several more improvements to make to build out all the features I would like.




An Engineering Manager consultant who is seeking additional skills using Unity 3D for game and application development.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Here is how I wrote Python script to wish my colleague Happy Birthday

Hyperdex — Modular Cubes

(Android + IOS) Native app development vs React Native Vs Flutter.

Makers Week 1: Surfing in the coding ocean but I managed to catch some fish

Binary Search: Practice Problems

Join Phala Network Telegram Reward. Chance to Win Over $500 by Following Easy Tasks!

3 Reasons Automated QA Is A Pox On Our House

automated QA - umbrella

KuCoin Supports the Kusama Parachain Slot Auction

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Chris Nielsen

Chris Nielsen

An Engineering Manager consultant who is seeking additional skills using Unity 3D for game and application development.

More from Medium

Journal 143 — Unity Project Development, 2.5D Shooter

How I used scriptable objects to build a powerup system

Using the Unity Profiler

Making a RTS game #48: Various fixes, improvements and clean-ups (Unity/C#)