Sign in

Where we last left off, we have an object that automatically spawns enemies into our scene. However, the enemies take up a lot of space in our hierarchy. So, we can make our spawned enemies child objects of Spawn_Manager itself. …


Right now, we place enemies directly into our game scene. Instead, we want to have enemies spawn automatically in the scene every few seconds. Thankfully, Unity allows us to pull this off with coroutines. Coroutines allow us to suspend the execution of one component in a game while everything else…


In most games like this, the player can get damaged three times before dying. We’ll be implementing this system today. Create an integer variable called “lives” and set it to 3 for now. We don’t want other scripts to modify this value directly, so we’ll create a public method to…


Now that our player can move and shoot, it needs something to shoot at. So today, we’re going to create an enemy for the player. First, place a normal cube in the scene and set its scale to .75 in all dimensions. …


Our player needs something to shoot. Fortunately, we’re going to create a laser prefab for the player. I’m going to use a small capsule in this case. Here’s my setup:

Back to the game. Our goal is to create a laser every time the user presses the space button. …


Where we last left off, we got the player to move according to our key input. However, it was slow.

This wouldn’t make for an enjoyable game, so we should be able to move faster. We can multiply the vector by another value, say 5.


In a 2D Galaga-style shooter game, the most important component is the player. Today, we’re going to be setting up a basic player that can move around. First, add a simple cube to your game scene. You can do this by right-clicking in the hierarchy and selecting 3D Object >…


While Unity has a default layout, many developers customize the tabs to fit their personal style. Today, I will show you how to move the various tabs in Unity around the environment. Here is a step-by-step process to build a more productive layout for Unity.

First, change the editor layout…


Having one’s computer crash and losing all their work is the worst nightmare scenario for any developer. Luckily, there’s a way to prevent losing work in the event of a crash: version control. Version control allows developers to keep track of changes to their projects over time. It also makes…


The player should be able to collect the rewards in a chest by clicking it. To start, we’ll enable chests to open just by clicking them. The first step in this process is to add a tag to our chest prefabs. First, however, we’ll need to create our own. Go…

FJ Hagen

Unity Developer learning new things everyday

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