Unity 4.1.1 - Web Build Size

I have noticed that in the new Unity version, the Web Player Build file is actually much bigger (game that was 1.7MB is now 3MB, game that was 4.1MB is now 6.8MB). Is this normal? Why is the file with the game so much bigger?

Anyone? :slight_smile:

Maybe because of the lightmapping bug that creates black unneeded lightmaps and has a very bad packing? I have no clue :slight_smile:

Hmm, maybe you could tell something more about this bug. Is there a way to remove those black lightmaps? I didn’t notice any unusual images in the Editor Log

Not really. They are created by the lightmapper since Unity 4.0 here and there. Unity 3.5 didn´t create them. I have a level where in Untiy 3.5 i have three lightmaps. And in Unity 4 i have ten. Seven completely black ones, and three regular ones, bad packed.

But when you don´t lightmap your levels then you most likely dont have them. And the bigger exe size could be anything else too. Like other import settings for your textures. Thats why i said i have no clue, sorry.

I have lightmaps, but I think it’s not the reason. For me it looks like the compression algorithm has been changed, because 90% of the size goes to the textures as usual, but this time they are much bigger than before.

BTW. Are you the owner of the site you have in your signature? I remember seeing your site long time ago when I was looking for sprites, nice website :slight_smile:

Hello! I tried that with the Angry Bots and the web build has the same size. Can you please report a bug and attach your project to it with repro steps?
Cheers!

Yes i am. And thanks :slight_smile:

Not aware of any build size increases with WebPlayer, so maybe it’s something very specific that you use in the project that does this. Feel free to report a bug report and attach a project which we can test with in both Unity versions.

Send me the case id and I’ll take a look for you.

Thanks,
Chris

If that’s the case I will try to figure this out. The only possible explanation I have for now, is that it’s something with the compression algorithm. Can you tell me if you have made any changes regarding this? Because the size increase is clearly due to the textures and other assets. I will look deeper into it tomorrow to see if I will be able to figure anything out.

Maybe someone else could tell if it’s the same for your project or not?

For what it’s worth, we have experienced the same thing (large webplayer file size) and have not yet deployed with 4.1.x as a result.

Tell some more, how much larger it is? In the Editor Log you can see where the kilobytes go, in my case I haven’t noticed anything unusual but I will look again.

We have not made any changes to that as far as I know, a bug report as described above would be great.

Thanks,
Chris

The problem is that I can not send the project to anyone. But maybe I will be able to figure this out myself somehow.

I would also like to tell that I am using Mac version of Unity, but it probably doesn’t matter :slight_smile:

Try to create an example project that reproduces the problem i would say.

We have reverted back to 4.0 since my original evaluation of 4.1.x but at that time, our 4.0 webplayer file was 9.7MB in size, the same project built in 4.1 was 17.2MB.

A team member has installed 4.1.2 and doing a profiler comparison shows that his total texture memory footprint is nearly 20% larger than the same project in 4.0.1. I know this is not definitive in terms of the final webplayer file size but it is telling of a significant difference in how the versions are handling textures.

Anyone else have this problem? Maybe it has something to do with the terrain.

I’ll reiterate the need for a bug report which includes a repro case compatible with Unity 4.0 version. I suggest you spend time getting a repro that you can send us which is compatible with 4.0 and includes the 4.0 web build.

This has been dragging on for over a week, we could have had it solved by now if we had the bug report :). @Tiles has the right thought process :).

Thanks,
Chris

I was about to send you the reproduction, when I have found something interesting. I removed the Library/metadata folder to make the project smaller. Then I reopened the newest version of Unity, it imported all assets and it turns out that:

  1. The Library/metadata folder is two times bigger after this re-import (it was 55.2MB now is 111MB).
  2. The size of the build is equal to 16.1MB (it was 6.8MB before the import).

I am pretty sure that the grow in size is due to this. My original size increase was from 4.1MB to 6.8MB, it was probably because when I opened the project in the new version, it re-imported some of the assets. After removing the whole metadata folder it re-imported all assets so the increase is bigger.

Now you can probably try this with every project so you don’t need my project to test this. I hope you can fix this, because the increase is from 4MB to 16MB so it’s 4 times bigger! If I would not have the old metadata folder made by older version, my game would have now 16MB :slight_smile:

I may be wrong. After deleting and importing again the “Max Size” field in the Inspector is equal to 1024 for every texture (before I was using lower value), so the increase may be because of that. So I think I will send you the reproduction of my game tomorrow after all.

Same problem here, webplayer build with 3.5 was ~15 MB, after upgrading the project and building again with 4.1 (without changing anything at all) size is ~32MB