Journal 145 — Unity Project Development, 2.5D Shooter

Objective: To fix the Main Menu and Game scenes and set up Audio

In the previous articles, I got the UI and mid-level boss and final boss working. I want to fix the Main Menu screen and also set up some sound effects and background music.

Main Menu

I’ll start with a new scene that contains a UI Canvas with a background image and some UI buttons for Start, Options, and Quit Game. The Options button will bring up a sub-menu to be able to modify the audio level and brightness level.

I’ll add a new C# script called MainMenu and attach it to the UI Canvas. We’ll need to add functions to set the Options menu active and inactive, quit the application, and load the game scene. Once these are set up, we can update the UI buttons with OnClick() events.

Also, be sure to update the Build Settings now that there’s a Menu scene and Game scene.

We can update the OnClick() events in the inspector by dragging the Canvas with the MainMenu script, and selecting the correct functions to load the game scene, Options menu, or quit application.

In the Options menu when set active, we need to update the Back button to turn the Options menu back to inactive.

Now, let’s see this in action.


Let’s add an empty game object called Audio Manager. I’ll add a background object and just play a looping track I found on

Then, I will pick out some weapon sounds for gunfire and missiles, vehicle sounds for the plane and helicopter movement, collectibles, and explosions.

Player Weapons

On the Player game object, I will add an Audio Source component. In the Player script, I’ll make an audio array to switch out the gunfire sounds to the weapon levels whenever the weapon is triggered in Update.

In the Inspector, I’ll add three sound clips I found in some Unity Asset packs.

Collectibles and Destroy

For the collectibles, I will add a script to the Audio Manager, and I will create a singleton and use functions to play the collectible pickup sounds and also play sound when a player or enemy is destroyed.

In the Enemy script, I will call the audio clip when destroyed.

In the power up script, I will play sounds when the OnTriggerEnter event is called.

Thank you for your time!

For the next article, I plan to work on some post processing effects and more polishing of my game.




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

Python for kids

Why I Don’t Like IDEs

Writing generic file reader in Rust

Install Odoo using Docker, Nginx on Ubuntu 20.04 — AWS

Java Program To Print Multiplication Table for Any Number

Do We Need a Replacement for C?

Sprint Ceremonies — Demystified!

Simplest WebRtc Debugging Development Environment For Linux

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 151 — Unity Project Development, 2.5D Shooter

Prefab dependency injection in Unity

Creating an Office Den in Unity Part 2: Lights, Cookies and Emissions

How I used scriptable objects to build a powerup system