Uncaught ReferenceError: unityFramework is not defined at HTMLScriptElement.script.onload (WebGL)

For anyone having issues with this, you can also select “Decompression Fallback” in your Publishing Settings, rather than building a Development Build or disabling compression altogether.

That said, the optimal solution is to fix your headers on the server side so that each file has the proper Content-Type and Content-Encoding - once set, your browser will handle the rest: Changes to the WebGL loader and templates introduced in Unity 2020.1

“Decompression Fallback” is useful, though, if you’re testing locally (for example, I use it while running live-server in VSC). It basically pushes the decompression to pure js

I’m on 2020.1.8f1 for what it’s worth

1 Like