The Hierarchy window contains a list of every GameObject in the current Scene. Some of these GameObjects are direct instances of Asset files (like 3D models), and others are instances of Prefabs, which are custom GameObjects that make up most of your application. When you add or remove GameObjects to or from the Scene (or when your gameplay mechanic adds or removes them), they appear and disappear from the Hierarchy.
By default, the Hierarchy window lists GameObjects by order of creation, with the most recently created GameObjects at the bottom. You can re-order the GameObjects by dragging them up or down, or by making them “child” or “parent” GameObjects (see below).
Unity uses a concept called Parenting. When you create a group of GameObjects, the topmost GameObject or Scene is called the “parent GameObject”, and all GameObjects grouped underneath it are called “child GameObjects”. You can also create nested parent-child GameObjects (called “descendants” of the top-level parent GameObject).
On the left-hand side of a parent GameObject’s name, click its drop-down arrow to show or hide its child GameObjects. Hold down the Alt key while clicking the drop-down arrow to toggle visibility of the parent’s descendant GameObjects, in addition to the immediate child GameObject.
To make any GameObject the child of another, drag and drop the intended child GameObject onto the intended parent GameObject in the Hierarchy.
You can also drag-and-drop an GameObject alongside other GameObjects to make them “siblings”: that is, child GameObjects under the same parent GameObject. Drag the GameObject above or below an existing GameObject until a horizontal blue line appears, and drop it there to place it alongside the existing GameObject.
Child GameObjects inherit the movement and rotation of the parent GameObject. To learn more about this, see documentation on the Transform component.
You can make any GameObject in the Hierarchy window a “default parent”. When you drag a GameObject into the Scene view, Unity automatically makes this GameObject the child of the GameObject you set as the default parent.
To make a GameObject a default parent:
When you drag a GameObject into the Scene view, in the Hierarchy window, the child GameObject is indented below the default parent GameObject. The name of the default parent GameObject is bold.
To remove default parent status from a GameObject:
The name of the GameObject that was previously the default parent is no longer bold. When you drag a GameObject into the Scene view, it appears at the top level in the Hierarchy window. In other words, Unity does not make this GameObject the child of the GameObject that was previously the default parent.
You can only set one default parent per Scene. In the Hierarchy window, if you set a GameObject as the default parent, and then you make a different GameObject in the same Scene the default parent, only the second GameObject is the default parent.
If you have multiple Scenes in the Hierarchy window, and you set default parents in each Scene, when you drag a GameObject into the Scene view, Unity makes the default parent GameObject in the active Scene the parent of the new GameObject.
You can set a keyboard shortcut for the default parent setting in the Shortcuts manager. On the Shortcuts window, assign a keyboard shortcut to Hierarchy View > Set as Default Parent. If there is no default parent set, and in the Hierarchy window you select a GameObject, use the shortcut to make this GameObject the default parent. When a default parent is set, use the shortcut to remove default parent status from any GameObject that has it.
GameObjects in the Hierarchy window can be sorted in alphanumeric order. In the menu bar, select Edit > Preferences in Windows or Unity > Preferences in macOS to launch the Preferences window. Enable Enable Alpha Numeric Sorting.
When you enable Enable Alpha Numeric Sorting, an icon appears in the top-right of the Hierarchy window, allowing you to toggle between Transform sorting (the default value) or Alphabetic sorting.
In the Hierarchy window, the Scene visibility controls allow you to hide and show GameObjects in the Scene view without changing their in-application visibility. The Scene picking controls are next to the Scene Visibility controls. Use the Scene picking controls to toggle between blocking and allowing you to select GameObjects in the Scene view while you are editing.
When working with large or complex Scenes, these controls make it easier to view and select specific GameObjects.
In the Hierarchy window, you can have more than one Scene open at the same time. To find out more about this, see the Multi Scene Editing page.