How to Run and Play a Unity WebGL Build Locally (Simple)

preview_player
Показать описание
How to Run and Play a Unity WebGL Build Locally (Simple)

Greetings, today I am here with a quick and simple Unity tutorial. We are going to look at how to Run and Play a Unity WebGL build locally.

So, you have built your Unity game. It is a WebGL one, but you want to test it for platform specific bugs and see how it runs in a web browser. You can hit play and run, but that would mean you would have to build the game each time you want to playtest.

You double click your index html file, the game doesn't load. You could upoload your Unity WebGL build to itchio or Github. That takes time.

This solution is super simple! it takes less than a minute and I use this at my day job for when I need to quickly test something during its early stages.

This will host a Python server on your machine. This server will run your game when someone joins it. You can then try out your game by opening a web browser and typing "localhost:8000/".

Now you can play your webgl game. Please note this is a locally hosted server so others can't connect to it. If you want your friends to try your game, you could send them the webgl build and this tutorial or you could host the game on a website like Github or itchio.

Thanks for watching this quick tutorial on how to Run and Play a Unity WebGL Build locally.

How to Run and Play a Unity WebGL Build Locally (Simple)
Рекомендации по теме
Комментарии
Автор

You may need to hold the "Shift" Key and right click to see Powershell as an option.

maxodidily
Автор

Wow, quick and fast. Not a complicated video but effective ^^.
You have a great vocal voice for tutorial videos. It's perfect for this kind of videos :D

KevKrieger
Автор

please make mode unity webgl tutorials. yours actually work unlike the others on youtube

milkandcookies
Автор

use --bind <your_ip> to make it public on LAN - not just from a localhost

PetrVosoust
Автор

Nice and clear tutorial, many thanks. I am getting this error, would you know how can I fix it:

"Unable to load file Build/HTML.framework.js.gz! Check that the file exists on the remote server. (also check browser Console and Devtools Network tab to debug)"

nomisnibor
Автор

I am having trouble on my machine. It seems to want to use the https protocol, not http. What is the python command for an https server?

Shakespeare
Автор

Can we make this run with Brotli compression?

vresearch
Автор

Would it work if i instead of doing a python localhost server used the VS code addon for hosting a localhost server?

xx_sad_dam_whose_sane_xx
Автор

Now there is a problem when I try to open any folder it opens visual studio. Does anyone know how to fix it?

arvydasmazauskas