How to compile a Unity project for Windows


In this arti­cle we see how to gen­er­ate a stand­alone ver­sion of our project for Win­dows, that is to say a pro­gram that can be exe­cut­ed with­out the need to have the Uni­ty engine opened, this is the final result we are look­ing for, a ver­sion of the game or appli­ca­tion that can run on any com­put­er of the plat­form 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 Set­tings tab, this will open the "Build Set­tings" win­dow shown in Fig­ure 1. Here we can con­fig­ure some com­pi­la­tion para­me­ters, such as the scenes to be added and the tar­get platform.

unity build settings window to configure the compilation parameters
Fig. 1: Build Set­tings win­dow for con­fig­ur­ing the build and com­pile parameters.

Let's click on the "Add Open Scenes" but­ton to add the cur­rent scene to the com­pi­la­tion (a blank scene that comes by default). The scene placed in posi­tion 0 will be the one loaded at start­up, so if we have mul­ti­ple scenes we will have to reorder them accordingly.

add open scene button from the build settings window
Fig. 2: But­ton for adding the cur­rent scene to the compilation.

The next step is to click on the "Build and Run" but¬≠ton, this will dis¬≠play a win¬≠dow in which we will select the des¬≠ti¬≠na¬≠tion fold¬≠er to export the files of the game or appli¬≠ca¬≠tion. In my case I usu¬≠al¬≠ly cre¬≠ate a fold¬≠er called Builds in par¬≠al¬≠lel to the Assets fold¬≠er of the project itself, but you can choose any fold¬≠er you want, make sure you remem¬≠ber where it is locat¬≠ed so you can use the files later.

unity build settings window to configure the compilation parameters
Fig. 3: Build and Run but¬≠ton to cre¬≠ate a com¬≠pi¬≠la¬≠tion and run it.
create a unity build for windows and save the files in a folder
Fig. 4: We choose the loca­tion where the com­pi­la­tion files will be placed.

When we have cho­sen the des­ti­na­tion fold­er we click on "Select Fold­er" to confirm.

Fig. 5: The select­ed loca­tion is con­firmed with the "Select Fold­er" button.

At this point the com­pi­la­tion process begins, which will take more or less time depend­ing on fac­tors such as the com­plex­i­ty of the project, the tar­get plat­form and the hard­ware of our computer.

unity compilation process to generate a standalone version of a game or application
Fig. 6: The com­pi­la­tion process starts, the time it will take will depend on the com­plex­i­ty of our project and the com­put­er performance.

When the com¬≠pi¬≠la¬≠tion process fin¬≠ish¬≠es the appli¬≠ca¬≠tion opens auto¬≠mat¬≠i¬≠cal¬≠ly, in fig¬≠ure 7 we can see it, in this case it is sim¬≠ply a blank scene.

compilation of unity game or application for windows platform
Fig. 7: When fin­ish the build process the project com­pi­la­tion is opened.

If we go to the fold­er that was cho­sen for the com­pi­la­tion we will find the game or appli­ca­tion files (fig­ure 8). These files can be shared and will work on oth­er com­put­ers that use the plat­form for which it was export­ed and meet the min­i­mum hard­ware requirements.

files of a compilation of a game or application for windows made in unity
Fig. 8: Fold¬≠er con¬≠tain¬≠ing the com¬≠pi¬≠la¬≠tion files.


Scroll to Top
Secured By miniOrange