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

One of the easiest way to get your game on the Web is to use the WebGL platform. Although there are some limitations, this platform doesn’t require additional tools or plug-ins to play your game. In addition, WebGL games can be played in most browsers, so as long as the user has a browser that supports WebGL, they can play your game.

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

If you have your own personal server, you can upload it to your server and allow others to play.

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.

--

--

--

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

Recommended from Medium

LoRa E5 Dev Board example code in STM32 Cube IDE: LED Blink

5 Top Free and Open Source CRM Software: Examine and Select — Data2CRM

Statistics For Data Science with Python — Distributions (4/10)

Do you need Reactive Programming for your Project?

Hosting an R Plumber API using Azure App Service

Managing config file using configparser

Why We’re Streaming Media? Part II: The Secrets of PPIO’s Data Delivery Technology

Ensure Access & Identity in Google Cloud: Challenge Lab

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
Josh Vang

Josh Vang

More from Medium

CS371p Week 1/31–2/6 Blog: Tejas Karuturi

WELSH’S SUPER ULTRA MEGA PUMP PLAN

The Virtual Transition: Using Face-to-Face Best Practices to Grow Online Communities

CS373 Fall 2021: Preeth Kanamangala: Final Entry