About the problem of assembly weight for WebGL and about the "garbage" in the assembly (Editor Log)

Hello-hi. I would like to raise an already stagnant topic related to the assembly of WebGL and the incomprehensible content in it. In other words, to ask, solve or wait for an answer from the developers of Unity Technologies, whether it will be solved or in what ways to solve this problem.

If you use an URP project and optimize the project out of the box as much as possible by disabling and removing modules, then on version 6 the minimum weight will be 4.7MB. This is the minimum that is possible, leaving only the most necessary modules for the engine to work and the module associated with Audio. The engine logo is disabled (50KB) and even a workaround is disabled by disabling some file through folders (130KB). But if we go into the Editor Log, we will find a bunch of incomprehensible files that should not be in the idea, for example, related prefabs with postponement or error shaders and much more, one participant found XR shaders in the WebGL assembly through a special program!

What to do, yes, we know that there will be WASM compression, but what about these incomprehensible files, is absolutely everyone in the assembly so important in the project? Especially files related to debugging

1 Like

You can definitely go much lower than that! The current automated minimum build size is 3.32 MiB for Unity 6 URP and I believe this does not have package/module optimizations applied (eg uses new project defaults).

Also be sure to build a release/master build, and try enabling disk size optimization - both are in Player Settings.

There are long running thread about webgl build size optimizations here and here.

As far as I know, 64 x 64 compression was used there, which is a complete ass, I did everything possible to make the weight 4.45 MB, and why isn’t there just a list of what needs to be done, or is it a mystery?

(And by the way, I didn’t see any words about URP there at all.)

Well, I said that it’s not about URP, I clarified above that it’s about the URP project, which means I’ve achieved even greater success than the author of the post, 1.5 megabytes less than his

Oh right, sorry, I had looked at the BiRP build sizes. :frowning:

But ultimately what matters most is: how fast does it load? You can measure those times and you’ll be hard pressed to notice much of a difference between 5 or 6 MiB.

For the web, every megabyte will not be superfluous

1 Like

You gotta test this though!

Make an empty build, record the time. Make the build again but with a 2k texture in the first scene. Compare.