How do I speed up WebGL builds for testing?

I’m debugging some issues related to WebGL, and currently the build is taking around 15 minutes, which makes for a pretty slow feedback loop.

I’m wondering if there is anything that can be done to speed it up?

I disabled brotli compression, and that cut down the build time by ~70%.

  • Project settings -> Player -> WebGL tab -> Compression Format, set it to Disabled. Just remember to set it back when doing the release build, unless the web server is configured to use gzip compression for .unityweb files.

Development builds seem to be faster


Much of the time is spent compiling textures and models to wasm, so obviously, if you can, try to debug the issue in a separate empty project. If you can’t, try to make the build as small as possible:

  • Disable scenes you don’t need
  • Choose max size 1 for all textures in import settings
  • Disable big external libraries

Maybe put all of this in a script so you can easily do it when you need to debug web stuff.


Hey!
That was helpful
are there any more ways to speed it up a little?
I’m kinda stuck in a debug loop, since I do browser scripting I have to do a build for every simple change.
Thanks!

how do I make my project smaller for WebGL?