WebGL build hosted on github - no player

The approach described on Medium’s been working for me and suddenly stopped recently with the following error:

Uncaught ReferenceError: UnityModule is not defined
at UnityLoader.loadCode.Module (UnityLoader.js:4)
at HTMLScriptElement.i.onload (UnityLoader.js:4)

It seems that this has to do with the additional headers necessary to “explain to the server” what type of MIME encoding *.unityweb files are. It seems that Unity have improved this in 2020.1 ( Changes to the WebGL loader and templates introduced in Unity 2020.1 ):

  • Unity 2020.1 supports server-friendly naming schemes for the build files.

However, I can’t easily upgrade now. I’m using simmer.io for now.