What is Resources/unity_builtin_extra? How can I reduce its size?

When I build a Unity project (Unity 5 RC1), the breakdown of asset sizes in the log output shows that the single largest resource contributing to built size is “unity_builtin_extra”. I can’t find any information anywhere about what this is and what I can do to reduce its size or eliminate it. Can anyone help?

Used Assets, sorted by uncompressed size:
1.8 mb	10.8% Resources/unity_builtin_extra

I believe it contains the resources for features used that are built-in to Unity, but optional for a given project. Say, something like the default “Diffuse” shader: the code for which doesn’t appear in your Project anywhere but you can still use it, right? So it’s a built-in extra (and it’s “extra”, because not every project uses, and therefore needs the Diffuse shader).

But I may be completely wrong. As a test, try assigning a custom shader to all the materials in your scene and rebuild - see if the size of that resource changes.

[46302-捕获.png|46302]

Go into <Drive>:\<Unity-Projects-Folder>\<ProjectName>\Temp\StagingArea\Data

Observe the things in there.

A couple of folders with DLL’s, some .resource and .assets files and a single file called unity_builtin_extra in the folder “Resources”. Notably this is not the same size as the “unity_builtin_extra” reported in the logs

A cursory browse of this /single/ file appears to be an embedded binary header (look like a spreadsheet to me), and then precompiled shader fragments. Probably referencable by line number in the header.

With a bit of maths we can add up our items in these folders to the uncompressed build log file size.
So to answer your question, in my opinion, the “unity_builtin_extra” reported in the logs is a conglomeration of those folders.

I am not aware at this time of the general contents of the sharedassets0.assets / sharedassets1.assets
files however they may well contain the uGui ref images, or indeed they may be the fragments in the single_file. Perhaps others can expand. Hope it helps your cause.