Journal 30 — How to Build and Test Game in Unity
After several days of practice, we are at a point where we want to make a test build of our game in development. At this point my practice game only has one level, but the game has all the functionality in there.
To start the process, we access the Build Settings from the File dropdown menu.
In the Build Settings, there’s multiple platforms that can be used to make a test build. For this example, I’m going to try a standalone PC build, and also a HTML 5 WebGL build. Under the Scenes in Build, we need to make sure all the game scenes are listed and in the correct order. You can drag in game scenes from your project folder if necessary.
When we select another game platform to build, the Build button changes. If switching between a PC build to WebGL, there’s a warning that the Color Space needs to be modified, so we will modify this shortly.
Under the Player Settings, you can update your info about the Company Name, Product Name, Version, icon, cursor, etc.
One initial setting we will want to modify is the starting resolution and whether we start in fullscreen mode or not. For this example, the game view was created in a 16:9 ratio, and so we can make the game start in a window at 1600 x 900 resolution. If you select starting the game in Fullscreen Mode, then you should make sure to add some code to your game that you can easily quit, such as by pressing the Escape key.
As mentioned above, if switching platforms to a WebGL build, there’s a warning that the Color Space must be changed from Linear to Gamma.
Most of the settings can be left at their defaults. When ready, you can click on “Build”, and Unity will compile the game. You are prompted for a storage location and folder name. In this case, I have made two storage areas, one for Windows builds, and one for WebGL builds.
Below are the results for a standalone build that can be played on any Windows PC by double-clicking the executable file.
After switching to WebGL and fixing the Color Space, we select Build again, and this time, here are the results.
Thank you for your time!