How to Build and Test your Unity Game
Objective: learn how to deploy your Unity game project onto PC/MAC/LINUX for evaluation and testing.
Select File / Build Settings… and by default you will find yourself with the PC, Mac & Linux Standalone deployment platform selected.
In the Build Settings, the Target Platform will be set to the type of machine you are working on (in my case a Mac). You then want to select Player Settings… to open the Project Settings of your build. This is worth a good look since it allows you to customize much of the information about your project, such as the company name, product name and version. There is way too much info here to dig into, so I encourage you to follow along in the Unity manual found here.
An important detail to consider is the Resolution and Presentation / Fullscreen Mode setting to Fullscreen Window. By selecting your build to open in full screen, you need to make sure you have some way of exiting the fullscreen mode during your game, or once the game is finished. This is where implementing an “ESC key to Quit the game” is important in order to exit back to your OS. See my previous article on how to do this here.
If you don’t have such an option built in to your game, you can select the Fullscreen Mode as Windowed and adjust your desired default screen width and height. Once you are happy with the settings of your build, close the Project Settings window and select “Build”.
You will then be asked to select a location to save your build. I would recommend setting up a specific folder for all your builds to keep everything organized.
Once Unity is done compiling your project, the location folder will pop up on your screen, and you can go ahead and launch the application (.exe/.dmg).
Have fun testing your game! Thanks for reading :)