How to Host Unity Games for the Web

Building in the WebGL Platform

James Hills
2 min readJun 7, 2022

A fun way to showcase your games is to build them in WebGL. In order to do this, there are a few changes you have to make in Unity.

  • First, click on File at the top of the Unity window and select Build Settings.
  • Select WebGL in the Platform list and then click the “Switch Platform” button.
Note: If you don't already have the WebGL platform installed, your screen will give you an option to install WebGL through the Unity Hub. You will need to do this if you want to switch to the WebGL platform and host your games on the internet.

You will see that we need to modify the Color Space in order for the Build to compile properly.

  • With the Build Settings window already open, click on the “Player Settings” button.
  • Be sure you have “Player” selected in the Project Settings list.
  • Click on the “Other Settings” drop down and change the Color Space to “Gamma”. This may take a minute or so to compile.
  • Once Unity is done compiling, close the “Player Settings” window.

After Unity compiles, you can now Build in the WebGL platform.

  • In the “Build Settings” window, click on the “Build” button.
  • Select/Create the folder to store the WebGL Build and click the “Select Folder” button.

Unity will compile the project and save it in the selected folder. If you want to play it on the internet, you will have to upload the files/folders that were created onto the website where you plan to host your games.

Thank you for reading this article. I hope you found it helpful and informative. If you want to continue to see my progress on this project and future projects, please follow me here on Medium.

--

--

James Hills

I am a married father of 5 children. I decided at 13 years of age that I was going to become a Software Developer.