Scenes and the object hierarchy
A scene (levelN) is a flat list of objects: GameObjects (class 1), each with a Transform (class 4, or a
RectTransform, 224, for UI) and a list of components (renderers, colliders, lights, cameras, scripts). Parents and
children are links between Transforms; the file has no nesting. Sourced · Unity manual A scene file stores its own
GameObjects and components, not the meshes, materials and textures its renderers use: those are in the
sharedassets files, referenced by file id and path id.
Observed · SkateBIRD
Contents of real scenes
Section titled “Contents of real scenes”| Scene | Objects | GameObject | Transform | MonoBehaviour | MeshRenderer | MeshCollider | BoxCollider | LODGroup | Confidence |
|---|---|---|---|---|---|---|---|---|---|
SkateBIRD level1 (bedroom 1) |
44,305 | 16,189 | 14,871 | 4,847 | 1,351 | 1,669 | 515 | 0 | Observed · SkateBIRD |
SkateBIRD level12 (playground) |
86,103 | 32,277 | 31,256 | 8,186 | 2,655 | 4,133 | 1,338 | 0 | Observed · SkateBIRD |
Sledding Game level1 (the mountain), build 25351629 |
151,088 | 45,145 | 42,057 | 12,168 | 18,069 | 694 | 4,151 | 2,507 | Observed · Sledding |
PEAK 3.0.0 level4 |
623,157 | 184,286 | 181,348 | 47,571 | 71,447 | 15,658 | 7,098 | 12,596 | Observed · PEAK |
PEAK 3.0.0 level1 |
52,515 | 14,457 | 14,025 | 2,820 | 8,178 | 1,670 | fewer than 60 | 1,947 | Observed · PEAK |
Each count is the number of objects of that class in the one file. SkateBIRD’s scenes hold no terrain, no LODGroup and no
navmesh; Sledding Game’s holds terrains and tree prototypes
(terrain). Observed · SkateBIRD, Sledding
SkateBIRD’s scene roots show how a game scene is built: every playable scene is self-contained, with the player bird, the
skateboard, cameras, post-processing, a dialogue manager and the mission set in it, so a scene is a whole level and not
geometry alone. The playground (level12) has 18 roots including Level Elements, Missions - Playground,
Non-Static Level Elements, Reset Positions, Player Birb, Cinemachine SkateCam 2.0, Skateboard For Skating and
Main Camera. Observed · SkateBIRD
The frame
Section titled “The frame”Unity’s frame is left-handed, +Y up, +Z forward, in metres. A yaw of 0 faces +Z. A renderer in a right-handed frame
with counter-clockwise front faces (glTF) is reached by negating one axis (z): positions, normals and tangent directions
negate z, triangle winding reverses, and a tangent’s w flips because the mirror flips the bitangent
cross(normal, tangent.xyz) * w. Observed[every vertex and triangle of a sample of small real meshes, against an
independent decoder]{games=“sledding”}
A Transform stores a local position, rotation (a quaternion x, y, z, w) and scale; the world matrix is the product of
the chain from the root, Matrix4x4.TRS(position, rotation, scale) at each step. Sourced · Unity manual The product of
such steps is not always a rotation and a scale: a rotated child under a parent with a non-uniform scale is sheared, and
an odd number of negative scale components mirrors it. Inferred In Sledding Game’s first level 6 composed world
matrices are mirrored and 1,224 are sheared, so they cannot be written back as one position, rotation and scale.
Observed · Sledding A RectTransform’s
stored local x and y can be stale: they come from its anchors: the parent rectangle’s minimum plus its size times the
anchors interpolated at the pivot, plus the anchored position. Observed · Sledding
Prefabs
Section titled “Prefabs”A prefab instance placed in a scene is not recorded as such in a build: the scene file holds its GameObjects, Transforms and
components like any others, and no PrefabInstance object (class 1001) occurs in the SkateBIRD playground or its sharedassets0,
Sledding Game’s mountain or sharedassets1, PEAK’s island scene or Big Walk’s world scene. Observed A prefab that something
refers to by object, such as a terrain tree prototype, is a hierarchy of objects in an assets file with a root GameObject.
Observed · Sledding The scene therefore does not say which prefab an object came from; repeated structure shows as repeated
names (Generated_Rail_Node*, Combined Mesh (root: scene) N). Inferred
Inactive state
Section titled “Inactive state”A GameObject can be stored inactive and a component stored disabled. Unity draws or uses an object only when none of the GameObjects on its Transform chain is inactive and the component is enabled; a file stores both flags as data, so a reader sees every renderer, collider and light whatever its state. Observed
A LODGroup lists, per level, the renderers it switches between; which level draws is Unity’s choice by screen size, not a scene fact. A disabled LODGroup switches nothing off: its levels draw together. Observed · Sledding, PEAK In Sledding Game, a LODGroup whose levels are one renderer each and whose coarser levels sit at the first level’s world matrix (up to rounding of a few f32 steps) is a mesh with a chain of coarser forms. Observed · Sledding
Static batching
Section titled “Static batching”A static-batched renderer draws a slice of a combined mesh whose vertices are already in world space; the renderer’s
matrix is the identity, and the slice is a first submesh and a count. SkateBIRD’s level meshes are such combined meshes
(Combined Mesh (root: scene) N) and ProBuilder output (pb_Mesh<number>). Observed · SkateBIRD
Materials and submeshes
Section titled “Materials and submeshes”Material i of a renderer draws submesh i. Submeshes beyond the renderer’s materials are not drawn, and materials beyond the submeshes draw the last submesh again as an extra pass. Sourced · Unity manual
Shadows
Section titled “Shadows”A renderer’s shadow casting mode is off, on, two-sided or shadows-only; m_ReceiveShadows is a separate flag. Observed
Whether a draw receives shadows decides one of its shader keywords, see draw keywords.
Observed
Build settings and scene identity
Section titled “Build settings and scene identity”The scene list in globalgamemanagers gives each scene’s path in the editor project and its build index; levelN is scene
N. Proven · SkateBIRD A scene’s root names can be stale copies from the scene it was cloned from, so identity comes
from the list. Observed · SkateBIRD