GitHub Pages ReferenceError: unityFramework

I’ve been trying to host unity web player project on Github Pages following this guide:

I think It’s outdated, because I get following error:
Uncaught ReferenceError: unityFramework is not defined
at HTMLScriptElement.n.onload (Build.loader.js:1)
And as said here:
“[…] a lot of web servers are misconfigured and they do not properly advertise compressed content to the browser clients.”.

Is there any way to configure github pages to work with unity web project without disabling compression?

1 Like

I found that enabling Decompression Fallback in Project Settings → Player doesn’t increase the size significantly but resolves the problem with GitHub Pages.

The ‘unityFramework is not defined’ error happens when you try to load the game with brotli compression either on an unconfigured server or over HTTP. It practically can’t decompress the js files.
Configure the server for brotli and remember to test the game over HTTPS