Content output of a build
Information about the files that Unity creates when you make a build of your project.
Read time 4 minutesLast updated a month ago
When you create a build of your Unity project, the folder (or equivalent on target platforms) contains the serialized files that make up the content of your application. The primary files in the build's folder related to asset loading are:
DataData- : Contains core engine data, global project settings (like Quality Settings, Graphics Settings Physics settings, Tags, and Layers).
globalgamemanager - : Contains assets referenced from the
globalgamemanager.assetsfile. This can include ScriptableObjects, such as HDRP or URP settings, and other assets referenced from those settings.globalgamemanager - : Contains all assets located within any folder named
resources.assetsin your project. These assets are always included in the build, regardless of whether they're directly referenced by any scene, and can be loaded withResources.Resources.Load - files appended with a number, for example,
level,level0: Eachlevel1file corresponds to the Scene List in Build Profiles, in the order they appear. These files contain GameObjects and components specific to that scene.level - files appended with a number, for example,
sharedassets,sharedassets0: These files contain assets referenced by a scene reference. Their numbering corresponds to the scene in the scene build order that references them first.sharedassets1 - : Contains built-in shaders if they're referenced by the build.
Resources/unity_builtin_extra - : Contains built-in assets that are always included in the build, such as default materials and fonts. This file is pre-built for each target platform, and distributed as part of the Unity Editor installation. Unity copies the file into the output as part of the build process.
Resources/unity default resources
Binary data
Each serialized file in the build can be accompanied by a .resS file which contains texture or mesh data. For example might be accompanied by and might be accompanied by .`
level0level0.resSsharedassets0sharedassets0.assets.resSSimilarly any serialized file that contains AudioClip or VideoClip objects will have an accompanying file that contains the binary data for those objects. For example or .
.resourcelevel0.resourcesharedassets1.resourceUnity stores the binary data in separate files to reduce memory usage when loading assets at runtime and to aid in efficient transfer to the GPU for certain data types.
Shared asset grouping
The order of the scenes in the Scene List in your project determines the way that Unity packs together shared assets as follows:
- Unity processes scenes in the exact order listed in File > Build Profiles > Scene List.
- Unity saves each object in the scene file to the corresponding file, unless it's an object that's stripped out (for example an Editor-only component).
level - For each reference from a scene object to an object in an asset, Unity uses the direct reference graph to pull all required objects into the build. If a discovered object isn't assigned to a file then it's assigned to the
sharedassetfile corresponding to the scene currently being processed. For example,sharedassetpopulateslevel2, but it can also reference objects insharedassets2,sharedassets0,sharedassets1,globalgamemanagers.assets, andresources.assets.unity_default_resources
This algorithm ensures that objects are only built once, rather than duplicating the assets across multiple scenes. It prioritizes efficiency of the first scenes in the scene list at the expense of later scenes. For example, has the least references of other files and can only reference , , and . In contrast, might reference objects spread over 100 files, , , and .
level0sharedassets0globalgamemanagers.assetsunity_default_resourceslevel99sharedassetglobalgamemanagers.assetsresources.assetsunity_default_resourceThe algorithm gives specific preference to the first scene, because it's the first to load when the application starts.
Player data compression options
You can optionally compress Player data into an LZ4 ArchiveFile, by specifying . This is the same file format that Unity uses to archive AssetBundles.
BuildOptions.CompressWithLz4The compressed file for Player builds is always called and contains the global game managers () serialized files, scene serialized files ( and files), Resources serialized files (), and shader serialized files ().
data.unity3dglobalgamemanagerslevelsharedassetsresources.assetsResources/unity_builtin_extraIt doesn't contain , because the content build doesn't generate that file.
Resources/unity default resourcesIt also doesn't contain any files that contain video and audio content, which are left outside the file.
.resourcedata.unity3dAssetBundle content output
If you use AssetBundles to build content, then the way Unity assigns objects to files, and the file naming conventions, are different. For more information, refer to AssetBundle build output.