I built my Unity on HTML5 WebGL and this error message shows up when I try to launch it

Viewed 3285

enter image description here

Unable to parse Build/Pain.framework.js.br! Loading pre-compressed (brotli or gzip) content via a file:// URL without a web server is not supported by this browser. Please use a local development web server to host compressed Unity content, or use the Unity Build and Run option. Monopoly A3

1 Answers

The message is pretty self-explanatory: you'll need a local server to do that. They're countless ways to do that but here's one of them:

XAMPP

Just download it and run it (The XAMPP Control Panel - Apache -> Start). Then put your files in C:\xampp\htdocs\ (On Windows, not sure for other systems). C:\xampp\htdocs\ Will be the equivalent of http://localhost in your browser, so if you put example.txt in C:\xampp\htdocs\, it will be available at http://localhost/example.txt.

Other options

XAMPP is my personal favorite, but they're other options, like the other *AMP, like WAMP, MAMP and LAMP, for Windows, MacOS, and Linux respectively (XAMPP being multiplatform - Also more exist is you're curious).

They're also "simpler" solution (in the sense of more lightweight ones) like http-server for NodeJS, or Python's http.server. But they need to be executed on the right folder each time. Both solutions works fine so it's up to you to choose your preferred.

Related