How to Host Unity Games on the Web

Building on the previous article, let’s have our game run on the Web. That would make it OS independent, enabling us to have one build that runs on Linux, Mac, and Windows.

Objective : Building and Deploying the game to Web Browsers.

The process of building our game for browsers is easy. We are first required to switch Platforms to the WebGL module.

In my case, I haven’t installed the WebGL module, so I first have to start by installing it. Thankfully, Unity makes it easy to do so.

File → Build Settings → Platform → WebGL → Install with Unity Hub

Upon completion, you should see a WebGL logo added to your desired Unity Version along with all the previously installed Platforms.

WebGL module installed

If your project still shows that you might have to install the WebGL module, restart the project. After that, Switch Platform to the newly installed WebGL module.

Upon completion, you can alter the Player Settings like resolution, the template or any desired settings.

I chose to go with the Minimal Template for no particular reason. Just wanted to see how it looks.

With this we can now create a WebGL build for our game.

Thank you for reading. More to come!!!

Aspiring Game Developer with experience in the field of Machine Learning.

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