Version: Unity 6.2 (6000.2)
Language : English
Build Profiles window reference
Build path requirements for target platforms

Content output of a build

When you create a build of your Unity project, the Data 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 Data folder related to asset loading are:

  • globalgamemanager.assets: Contains core engine data, global project settingsA broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your project behave. More info
    See in Glossary
    (like Quality Settings, Physics settings, Tags, and Layers), and assets that are globally referenced by all scenesA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
    See in Glossary
    .
  • resources.assets: Contains all assets located within any folder named Resources in your project. These assets are always included in the build, regardless of whether they’re directly referenced by any scene, and can be loaded with Resources.Load.
  • level files appended with a number, for example, level0, level1: Each level file corresponds to the Scene List in Build ProfilesA set of customizable configuration settings to use when creating a build for your target platform. More info
    See in Glossary
    , in the order they appear. These files contain GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
    See in Glossary
    and components specific to that scene, and any assets that are only referenced by that single scene.
  • sharedassets files appended with a number, for example, sharedassets0, sharedassets1: These files contain assets that multiple scenes reference. Their numbering corresponds to the scene in the scene build order that references them first.

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:

  1. Unity processes scenes in the exact order listed in File > Build Profiles > Scene List.
  2. For each UnityEngine.Object asset that the build requires, Unity uses the direct reference graph with the asset’s GUID and fileID pair to determine which scene uses it first.
  3. Unity packs an asset into a sharedassets file if more than one scene references that asset. It numbers the sharedassets file based on the first scene in the build order that directly references it. For example, if an asset is used in Scene 2 and 4, Unity places it in a file named sharedassets2.
  4. If an asset is only referenced by one scene and no other subsequent scene, Unity packs it directly into the level file. For example, if an asset is used only in level 3, Unity places it in a file named level3.

This algorithm ensures that your application loads assets shared across multiple scenes only when their earliest reference scene is loaded, rather than duplicating the assets across multiple scenes.

Player data compression options

You can optionally compress Player data into an LZ4 ArchiveFile, by specifying BuildOptions.CompressWithLz4. This is the same file format that Unity uses to archive AssetBundles.

The compressed file for player builds is always called data.unity3d and contains the global game managers (globalgamemanagers) serialized files, scene serialized files (level and sharedassets files), Resources serialized files (resources.assets), and shaderA program that runs on the GPU. More info
See in Glossary
serialized files (Resources/unity_builtin_extra).

It doesn’t contain Resources/unity default resources, because that is not generated by the content build.

It also doesn’t contain any .resource files that contain video and audio content, which are left outside the data.unity3d file.

Additional resources

Build Profiles window reference
Build path requirements for target platforms