How to compile a Unity project for Windows

Introduction

In this article we see how to generate a standalone version of our project for Windows, that is to say a program that can be executed without the need to have the Unity engine opened, this is the final result we are looking for, a version of the game or application that can run on any computer of the platform for which it was compiled.




How to create a Windows build from a project in Unity 3D

We start by going to the File > Build Settings tab, this will open the “Build Settings” window shown in Figure 1. Here we can configure some compilation parameters, such as the scenes to be added and the target platform.

unity build settings window to configure the compilation parameters
Fig. 1: Build Settings window for configuring the build and compile parameters.

Let’s click on the “Add Open Scenes” button to add the current scene to the compilation (a blank scene that comes by default). The scene placed in position 0 will be the one loaded at startup, so if we have multiple scenes we will have to reorder them accordingly.

add open scene button from the build settings window
Fig. 2: Button for adding the current scene to the compilation.

The next step is to click on the “Build and Run” button, this will display a window in which we will select the destination folder to export the files of the game or application. In my case I usually create a folder called Builds in parallel to the Assets folder of the project itself, but you can choose any folder you want, make sure you remember where it is located so you can use the files later.

unity build settings window to configure the compilation parameters
Fig. 3: Build and Run button to create a compilation and run it.
create a unity build for windows and save the files in a folder
Fig. 4: We choose the location where the compilation files will be placed.

When we have chosen the destination folder we click on “Select Folder” to confirm.

Fig. 5: The selected location is confirmed with the “Select Folder” button.

At this point the compilation process begins, which will take more or less time depending on factors such as the complexity of the project, the target platform and the hardware of our computer.

unity compilation process to generate a standalone version of a game or application
Fig. 6: The compilation process starts, the time it will take will depend on the complexity of our project and the computer performance.

When the compilation process finishes the application opens automatically, in figure 7 we can see it, in this case it is simply a blank scene.

compilation of unity game or application for windows platform
Fig. 7: When finish the build process the project compilation is opened.

If we go to the folder that was chosen for the compilation we will find the game or application files (figure 8). These files can be shared and will work on other computers that use the platform for which it was exported and meet the minimum hardware requirements.

files of a compilation of a game or application for windows made in unity
Fig. 8: Folder containing the compilation files.

Scroll to Top
Secured By miniOrange