Publishing Unity games on the web.

Esteban Ibarra
3 min readApr 16, 2021

So we’ve built an executable we could share with friends and family, how do we share our creation with the rest of the world? Build it for the web! Using WebGL, you can create a special build of your game that people can play online! Ready to start posting games on your webpage? Let’s go!

Just like before, Get to the build settings, but this time, Select WebGL.

We get a warning that we need to change the color spacing back to gamma, so let’s do that.

Ok, we’ve taken care of that, let’s switch platforms! Hit the switch platform button, it will sit there for a few moments and then you’ll get a pop-up window showing Unity moving files around.

OK! We’re ready to build, hit that build button and choose or create a new folder for the web specific build.

And just like before, Unity will take a while to build your game. Go ahead and wait for it to do that.

Since I’m using Linux Mint, I was having issues compiling, but it seems to have been fixed by installing libtinfo5.

There also seems to be issues with compression settings with WebGL, you’ll want to get into your player settings/publishing settings and choose disabled for compression format.

Unlike an executable, your game will now run on a webpage which means you can upload it to your own website via ftp and everyone on the internet can enjoy it!

So let’s get this on an actual website, first we’ll need to prepare the files by moving them to your local website folder. I have mine set up in a special unity/practice folder.

Next open up your ftp program and connect to your host, I like FileZilla as it lets me drag and drop files.

The file’s quite large so it may take a minute or two to upload.

Then you can put a link of the index.html file on your main page or you can link to it directly like this!

That’s it for today! Starting tomorrow I’ll be posting my experience with framework and core programming challenges at GameDevHQ!

--

--