Running Unity3D WebGL with a local Apache Server

Well, it is much easier than I thought. If you know Apache, that is.

I tried to use the Live Server Plugin from Visual Code first, but that has no gzip module, so it can not be used for compressed builds. Meaning : You always would have to compile twice, and that I find stupid.

So I installed the Windows Apache Binaries from here for example, which have libz and even the Brokoli ? compression modules enabled by default.

„Running Unity3D WebGL with a local Apache Server“ weiterlesen

2021. Happy new yeah.

While still working on perfecting my Interaction Project, a little framework to easily create interaction between objects based on a easy to manage flag system, I am running into old problems when creating a WebGL Build for the current mini-game.

  1. The script at (localhost:x) embroid1.framework.js.gz was loaded, even if its MIME-Typ („application/gzip“) is no valid MIME-Type for JavaScript
  2. Uncaught SyntaxError: illegal character U+001F embroid1.framework.js.gz:1
  3. Uncaught ReferenceError: unityFramework is not defined onload http://localhost:x/Build/embroid1.loader.js:1

I had this before. I solved it. But it was quite a long time ago last year.

I will find the solution again and then post it here.

Also hopefully more posts about my Interaction Project this month and some cc0 textures / materials I made with the Substance Suite, with which I have fallen in love.