Our basic laser projectile is the default for our game but let’s add an occasional, over-powered projectile that ‘seeks’ an enemy when fired.

First, we add the photon laser (that’s what I’m calling it) power-up collectable in the usual way; duplicating an existing powerup, changing the artwork and the powerup…

We’ve implemented damage already for our player and given them 3 lives. Let’s add a health pick-up that can repair their ship.

The objective with this feature is to restore a single ‘life’ to the player when they collect the health pick-up. …

You’ve built and tested your game but now you want to share it with the world. One way to do this is to build it for WebGL and share it on the web. Here’s how.

Currently, our project is setup to build for Windows. To change this we need to go to File > Build Settings. Select WebGL and then click ‘Switch Platform’.

You’ve been creating your masterpiece in Unity and testing it as you go, but now it’s time to do a full build and test it as a standalone. Here’s how.

Once we’ve saved everything, we can go to File > Build Settings. In here we want to make sure that we have our Main Menu set to scene 0 and our Game, or first level at least, set to scene 1.

We click on Player Settings and under ‘Player’ change…

We know how to play a looped background music, but what about sounds that play when an action occurs? Let’s take a look at setting up the laser sound.

First we need to add an audio source to the Player object. We also want to uncheck ‘Play On Awake’ as we need to script when sounds are played.

Ian Plumpton

Software developer in the field of Unity and C#. Passionate about creating and always driven to develop.

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