How to Host Unity Games on the Web

In order to deploy your games onto a website, you will need to build your game using the “WebGL” build settings. To do this, simply select “WebGL” from the “Platform” box within the “Build Settings” window and then click the “Switch Platform” button located on the bottom right.

Sometimes you have to adjust conflicting Project Settings.

If there are any conflicts with your project settings you should see a warning prompt such as the one in the example below.

If you click on the “Player Settings” button in the “Build Settings” window.

You should be able to see the conflicting setting(s) which in this case is that the “Color Space” needs to be set to “Gamma” instead of Linear.

Build & Deploy

Now select the “Build” button within the “Build Settings” window and set your desired file location. Once it’s done compiling you should see similar files to the ones shown in the example below within your selected folder.

If you have a web server, you could take these three files and upload them onto there and allow your product to be played. Notice that if you click on the index.html file you can actually launch a WebGL window.

Hi, my name is Adam Reed and I am a software engineer specializing in Unity and C# development. Feel free to scroll through and check out some of my work!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store