Journal 31 — How to Host Unity Games on the Web

In the previous Journal, we created two test builds, one for standalone PC, and one for WebGL. In this example, we will go into a bit more detail on some of the settings to confirm for a WebGL build, and a couple options for hosting your game on the Web to play.

Under the build settings, you can switch to the WebGL Platform, and select Player Settings.

Unity Build Settings

In the Project Settings for Player, you need to convert the Color Space from Linear to Gamma.

Unity Project Settings for Player

Alternatively, if you uncheck the “Auto Graphics API”, this removes WebGL 1.0 which is not compatible with Linear Color Space. So with this approach, the Color Space can be left as Linear.

Unity Project Settings for Player, Color Space

Also in the Project Settings under Player → Publishing Settings, the Compression Format may be incompatible with certain hosting sites.

Unity Project Settings for Player, Publishing Compression Format

Once you have fixed all your settings, you can select “Build”, and the process will complete shortly with a .html file and two folders. You will need to select all these files and send to a compressed zip folder.

Unity test build for WebGL complete

One option to upload your test build is play.unity.com. The site has a very simply interface. You can create a free account, and from the homepage, select the upload arrow to post a project.

Unity Play for hosting a WebGL game

From there, you can upload your build, and fill in a few details about the project. At play.unity.com, I was able to successfully post a project using the Gzip compression with no errors.

Unity Play, post a project
Unity Play, opens test build successfully

Another option to post your test build is itch.io. Create a free account and from your Feed or Developer Dashboard you can upload a game or create a new project.

itchi.io, host a WebGL game

In the project creation page, you can fill in details on your test build and add screenshots.

itchi.io, Create a Project, fill in details

Further down the page, you can upload the test build files, again in a zip format. At itch.io, I was able to successfully upload and play with compression disabled.

itchi. io, upload WebGL files and update screen embed options and viewport size

At the bottom of the creation page, you can set the game access to “Public”, but only after you have done an initial save.

itchi.io, save project and make visible to public

Once you have saved your project at itch.io, you can view the published page, and also edit some of the format, such as text, colors, and show your screenshots.

itchi.io published game website, options to edit theme

Thank you for your time!

--

--

--

An Engineering Manager consultant who is seeking additional skills using Unity 3D for game and application development.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Java Program to Check If a Number is Neon Number or Not

Journal 41 — Aggressive Enemies in Unity Space Shooter

RockNSM 2.4 Release Announcement

Getting Started on Padlock

This Week In TurtleCoin (July 7, 2020)

How to install a fully encrypted Linux system on an SSD and HDD device with additional cache

Join the #100daysofcode challenge now.

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
Chris Nielsen

Chris Nielsen

An Engineering Manager consultant who is seeking additional skills using Unity 3D for game and application development.

More from Medium

Script Communication in Unity using GetComponent

The right way to wrap your UI inside the safe area — Unity

Trigonometry for Game Development

My journey becoming a Unity game developer: 2.5D Infinite Runner-Ledge Grab System-Pt3