Learning Unity — How To Build Your Unity Game

Joshua Nielsen
4 min readJul 8, 2021

In the last article, we learned more about the Unity audio system and how to make the best use of it. In this article, we’re learning how to build our Unity projects for our desired platforms.

When we say we are “building” our projects, what we mean is that we are having Unity take all of the work we’ve done with our assets, our scripts, our scenes, and so on, and Unity is going to put all of this work together so that the game can run on the selected platform on its own, without the Unity Editor. There are a variety of platforms available to build on, including all of the major PC operating systems, all of the major smart phone operating systems, many of the most popular modern gaming consoles, and even the world wide web.

For right now, we’re just going to look at building our projects for our home computers. Or, in the parlance of Unity, for “PC, Mac & Linux Standalone”. To begin, we need to go to the File menu and find the Build Settings option.

Unity Build Settings

We will want to keep the platform as “PC, Max & Linux Standalone”. From there, we can see several build options on the right side of the window. For this example, we will just keep these options at default, but make sure to check out the Unity documentation online to learn the details about these options.

More options, options that are specific to the PC operating systems, can be found by clicking on the Player Settings button in the bottom left of the Project Settings window.

Unity Player Settings

This actually takes us to a specific area of the Project Settings. Here we can configure several general settings for the project, such as the name and version number. Below that section, we can see another section that specifically has options for the home computer platform that we have selected.

There are far too many options here to go over in a single article, but I would recommend taking a look at the Resolution and Presentation section in particular. This section allows us to configure options pertaining to how the game will be displayed. For example, the specific resolution of the game and full screen vs windowed.

The last thing we will want to consider before committing to a build is the top section of the Build Settings window, which is the Scenes In Build section. In my picture above, no scenes have been added. This is not necessarily an issue; by default, the active scene in the Editor will be added to the build.

That being said, I would recommend making certain to add all scenes for your game to this section before building.

At this point, we can go ahead and click that Build button in the Build Settings window. This will bring up a new dialog window requesting a folder be selected. This folder will be the location where the entirety of your game is built and stored, so I would highly recommend making certain that you have the correct folder selected and that this folder is dedicated solely to your game. If we select the wrong folder, we run the risk of entangling our game files with other files.

Once the appropriate folder is selected, all that remains is to wait for Unity to finish building our project. This could take a little while, depending on project size.

Hopefully everything builds successfully at this point. If not, check the Unity Editor for any error messages to help with debugging.

Once the build is complete, just check the folder you specified and we should see our game files. The executable to run the game should be named the same as our Unity project. Run that file and that should be it, our game is running!

And that is how we build for our local PC operating system platform. In the next article, we’re going to check out building a Unity game for the web. Until then, good luck and happy coding!

--

--