Hello I have a problem!
I transfer my project from unity 5.2.4 to unity 5.5 and make Build for WebGL
WebGL.data in unity 5.2 takes 48mb and in unity 5.5 50mb uncompression.
When i statrs those build and look in broweser console/network - i see thats chrome downloads WebGL.data just 8.2 mb by unity 5.2
and for unity 5.5 he downloads - full 50 mb WebGL.data, so builds by unity 5.5 its slower about 4 times like for me!!!
Can anyone tell me how i can solve this problem in unity 5.5 ?
Are you making development builds? Compression is only used in release builds.
no I make release build as usual
the main problem not in compression, its in how chrome download this both webgl.data
on 5.2 app starts about 20 sec
on 5.5 app astart more than 1 min ( because webgl.data full dpwnloads - 50 mb)
What did you choose as Compression Format in WebGL publishing settings in Player Settings?
I set Gzip compression
Can you post a link to your uploaded build?
http://web.rollinom.co.il/Viewer/0.408/WebGL/WebGL.data
http://web.rollinom.co.il/Viewer/0.408/WebGL/WebGL.js
Working release link: רולינום
Your game seems to be correctly set up for compression. The data file is ~52 MB uncompressed, but is transferred compressed. It seems compression only helps a little here, bringing the size which is actually transferred down to ~43MB.
I don’t know why 5.2 would be any smaller. This may not be a WebGL specific issue at all. Do you see a size increase when building to other platforms? Can you check what uses size in the Editor.log (see here for how to do that: Unity - Manual: Reducing the file size of your build)? One thing which comes to mind is that IIRC there was a change in which Shader variants get included for “Always included Shaders” (Unity - Manual: Graphics). See if you have Shaders in there which you can remove.
ok Thanks! I will make investigations to this way
I make investigation and get next results:
build by unity 5.2.4 has 17 shaders inside and I get this size :.
If we take Unity 5.2.4 main files WebGL.data and WebGL.js
Uncompressed size of WebGL.data = 48 MB
Uncompressed size of WebGL.js = 27 MB
Total uncompressed size = 75 MB
But when it transfer by net it compressed.
Compressed size of WebGL.data = 6 MB
Compressed size of WebGL.js = 6 MB
Total compressed size = 12 MB
build by unity 5.5 I have the same number of shaders inside and I get this sizes:
Compressed size of WebGL.data = 50 MB
Compressed size of WebGL.js = 80 kB
Total compressed size = 50.08 MB
When i remove all shaders from build in unity 5.5 I get this number:
WebGl.data to 5MB
Also i make build by 5.5 with one “Standard” shader inside, i get huge increase of size WebGL.data - 33.8 MB
I’m trying to understand why the same build with Unity 5.5 compression takes 44 mb more then Unity compression in 5.2.4
Do you have any suggestion?
It’s the Standard Shader that is causing the massive build size.
We had/have the same issue: WebGL build size - Unity Engine - Unity Discussions
Yes, what sirrus wrote is probably the reason for the problem. The thread explains it.
thanks Guys i will think what to do with it …
I have the same problem. What can I do to make the file size lower again?