WebPlayer Build too large

From reading the documentation on webplayer build it states that Unity only includes assets in the build that it detects are used but I’m finding I get very different behaviour and it appears to be including most of my project folder.

To test this I’ve created an empty scene with just a main camera and simple cube from the gameobjects menu, this is the only scene I include in the build settings but the build size is around 200mb and looking at the console log it shows that it included most of my art assets.

***Player size statistics***
Level 0 'Assets/Scenes/Empty.unity' uses 115.2 MB compressed / 208.4 MB uncompressed.
Total compressed size 115.2 MB. Total uncompressed size 208.4 MB.

Textures      198.5 mb	 95.3% 
Meshes        7.6 mb	 3.7% 
Animations    0.0 kb	 0.0% 
Sounds        0.0 kb	 0.0% 
Shaders       1.6 mb	 0.8% 
Other Assets  76.0 kb	 0.0% 
Levels        52.4 kb	 0.0% 
Scripts       290.7 kb	 0.1% 
Included DLLs 137.5 kb	 0.1% 
File headers  98.4 kb	 0.0% 
Complete size 208.4 mb	 100.0%

Any ideas why it’s doing this? Is there any way to manually control what’s included in the build?

Thanks in advance

Just look at the assets that are being included in your build and you’ll see what’s wrong.

To do that, perform these steps:
Build your application as normal
Get out of the build context
Go to window>console from the top menu
On the upper, right hand corner of that’s screen look at Editor Console
Scroll all the way to the bottom of the window that pops up
Now, scroll up slowly - you’ll see a list of included assets

It only includes directly referenced assets, unless you’ve put them in the Resources folder, in which case it includes everything in that folder since there’s no good way to know what references Resources.

–Eric

You Sir are a hero :slight_smile: many thanks for clearing that up it’s been driving me crazy, I’d put a bunch of my assets in a folder called Resources that were being included in the build. Renaming the folder to something else has reduced the build size to 3mb.

And here we have a good example of why “magic folder names” are not such a good design. :wink:

–Eric

Yeah it’s not the most intuitive of decisions, I’d never have thought to look for magic folder names. Thanks again :slight_smile: