Eonevolve Learning
Unity and DevelopmentUnity and codeBeginner~5 min

Scenes and Hierarchy: Where Your Game Actually Lives

Snapshot

~65 sec

A scene is a saved tree of GameObjects - a level, a menu, a loading screen. The hierarchy panel shows that tree directly: where an object sits in it decides who its parent is, and parenting decides what moves with what.

You will learn

  • Describe a scene as a saved GameObject tree, not a special engine object.
  • Explain why an object's position in the hierarchy changes its behavior.
  • Name one reason a project might load more than one scene.

Target outcome

You can read a hierarchy panel and predict which objects move together.

Visual walkthrough

Visual walkthrough

~5 min

  1. What a scene actually holds

    • Scene

      A saved file listing every GameObject that should exist when it loads, plus their settings.

    • Hierarchy

      The panel that shows the scene's GameObjects as a tree of parents and children.

    • Parent / child

      A child GameObject's Transform is relative to its parent's Transform.

    • Root object

      A GameObject with no parent - its Transform is relative to the whole scene.

  2. One invented level, read as a tree

    The hierarchy is not decoration - it is the actual parent-child structure the engine uses to move, enable, and destroy objects together.

    Scene: "Level_01"

    1. LevelRoot

      Root object for the whole scene layout.

    2. Player

      Child of LevelRoot.

    3. CameraRig

      Child of Player - follows it automatically.

    4. EnemyGroup

      Empty container GameObject used only for organization.

    5. Enemy A

      Child of EnemyGroup.

    6. Enemy B

      Child of EnemyGroup.

    • LevelRootPlayerparents
    • PlayerCameraRigparents
    • LevelRootEnemyGroupparents
    • EnemyGroupEnemy Aparents
    • EnemyGroupEnemy Bparents
    The hierarchy is not decoration - it is the actual parent-child structure the engine uses to move, enable, and destroy objects together.

    Reading order

    1. LevelRoot

      Root object for the whole scene layout.

    2. Player

      Child of LevelRoot.

    3. CameraRig

      Child of Player - follows it automatically.

    4. EnemyGroup

      Empty container GameObject used only for organization.

    5. Enemy A

      Child of EnemyGroup.

    6. Enemy B

      Child of EnemyGroup.

    Connection explanations

    1. Player → CameraRig (parents)

      Parenting the camera to the player means moving the player also moves the camera - no extra script required.

    2. EnemyGroup → Enemy A (parents)

      EnemyGroup exists only to organize; deactivating it disables both enemies at once.

  3. Predict the move

    In the tree above, you move LevelRoot ten units to the right in the Inspector. What happens to Player, CameraRig, and the two enemies?

    Expected reasoning

    All five move ten units to the right with it, because every one of them is a descendant of LevelRoot in the hierarchy. Their local positions relative to their own parents do not change - only the shared root moved.

Go deeper