Building your game for the Web

You’ve built the mechanics, you’ve stomped the bugs, you’ve polished the features, you’ve tested it outside of Unity, and finally you’ve created a build of your game. So now what? Now, it’s time to publish your game. Luckily for us, Unity has simplified the steps.

Building for the Web

To get started, open the Build Settings by going to File -> Build Settings

Build Settings Window with WebGL platform already selected

If the default platform isn’t WebGL, you can select WebGL and click on Switch Platform at the lower right.

If your selected platform isn’t WebGL, select WebGL and click on Switch Platform

Resolving Color Incompatibilities

When switching to the WebGL platform, Unity will recompile files in your build. However, sometimes issues will appear and if this happens, you can change it in the Player Settings.

If you still have Build Settings window still up, you can click on Player Settings in the lower left corner of the window. In addition , you can access Player Settings by going to Edit -> Player Settings

Project Settings with Player already selected

Once the window pops up, you want to select the HTML5 logo (if not already selected), and click on Other Settings. Here, change the Color Space from Linear to Gamma and allow Unity to compile again. After Unity is done compiling again, you can close the Player Settings Window.

Now you can finally build your game for the WebGL platform.

Hosting Your Games

However, if you don’t there are several sites on the Internet that can host it, including:

  • Unity Play
  • itch.io
  • Simmer.io
  • gamepipe.io

In addition to these sites, some cloud services like Microsoft Azure and software development services like Github also allows you to host your game. However, do note that these sites can be more complicated to set up and host your game than sites listed above.