Manual
Manual
The Hierarchy
The Hierarchy lists the entities of the open scene as a tree, each under its parent. This page covers how to find and pick entities there, make, rename, duplicate, delete, cut, copy and paste them, arrange them by dragging, and drop files on them from the Project panel. Open it with Window ▸ Hierarchy (Ctrl+4).
On a Mac, Cmd takes the place of Ctrl in every shortcut on this page (see On a Mac).
The panel
Along the top of the panel:
- + opens the menu of what to make (see Make entities). What it makes goes at the top of the scene.
- The search box finds entities by name or by component (see Search).
- Expand opens every row, Collapse closes every row that has children, and Clear empties the search.
- Engine lists the engine's own entities as well. A Bevy world holds more entities than your game put in it, such as one for each registered system and each resource, and the Hierarchy hides them unless this is ticked.
- A count of the entities, such as
406 of 580 entitieswhen some are hidden, or3 matching · 406 of 580 entitieswhile you search.
Scenes
The entities of each scene sit under a band with the scene's name, one step in from it. A * after the name means the open scene has unsaved changes. Click the band to fold or unfold it.
The ⋮ at the band's right end, or a right-click on the band, opens its menu:
| Item | What it does |
|---|---|
| Save Scene (Ctrl+S) | Writes the open scene to its file. |
| Save Scene As... (Ctrl+Shift+S) | Writes it to a new file. |
| Show in Project | Picks the scene's file in the Project panel. |
| Unload Scene | While the game plays, unloads a scene the game loaded. |
The save items are grayed while the game plays, since Stop puts the scene back as it was. While a scene loads, its band says how far along it is, such as Loading 45%, or Ready · held for a scene held until the game shows it (see Load scenes while the game plays).
Entities in no scene come last, under Outside Scenes: what your game spawned without naming a scene, and the engine's own entities when Engine is ticked. While the game plays, Show the Game's Interface in the menu of the panel's empty space lists the UI documents the game shows, under a heading of their own.
Rows
Each row is an entity: a cube icon and its name. An entity with no name reads as its number, such as #412. A row with children has an arrow before it. Click the arrow to fold or unfold the row without picking it, and Alt+click it to fold or unfold everything under the row too.
The color of a row tells you what it is:
| Row | Means |
|---|---|
| Teal | An instance of a prefab, or a part its prefab put there. An entity the scene added inside an instance keeps the plain color. See Prefabs. |
| Faint | Switched off, by its own active checkbox in the Inspector or by a parent's; or cut and waiting to be pasted; or one of the engine's own. |
Hiding an entity with the eye in the Inspector does not change its row. Double-click a row to frame the entity in the Scene view, as F does.
Pick entities
Click a row to pick it. The Inspector shows what is picked last.
| Do this | To |
|---|---|
| Ctrl+click | Add a row to what is picked, or take it away |
| Shift+click | Add every row between it and the row clicked last |
| Ctrl+A | Pick every row shown, leaving out rows folded away or hidden by a search |
| Click empty space | Let go of everything |
| Right-click a row | Pick it and open its menu; on a row already picked, keep everything picked |
What is picked is dragged, cut, copied, pasted, duplicated and deleted together, as one change that one Ctrl+Z takes back. An entity under another picked entity goes with it. Only one entity is renamed at a time.
When you pick something in the Scene view, the Hierarchy opens the rows above it, clears a search that hides it, and scrolls to it.
Keys
While the Hierarchy has the keyboard:
| Key | What it does |
|---|---|
| Up, Down | Pick the row above or below the row clicked last |
| Home, End | Pick the first or the last row |
| Page Up, Page Down | Move a page of rows |
| Shift or Ctrl with any of these | Pick every row on the way |
| Left | Close the picked row; on a closed row, go to its parent |
| Right | Open the picked row; on an open row, go to the next row with children |
| Alt+Left, Alt+Right | Close or open everything under the row too |
| F2 | Rename (Enter on a Mac) |
| Ctrl+D | Duplicate |
| Delete | Delete (Cmd+Backspace on a Mac) |
| Ctrl+X, Ctrl+C, Ctrl+V | Cut, copy and paste |
| Ctrl+Shift+V | Paste as a child |
| Escape | Let go of what was cut |
Up or Down in the search box gives the keyboard to the rows. The same Delete, duplicate, cut, copy, paste and Select All keys also work while the Scene view has the keyboard.
Make entities
The menu of what to make opens from four places:
- + at the top of the panel, which makes the entity at the top of the scene.
- A right-click on empty space, the same.
- A right-click on a row, which makes the entity the row's last child.
- The Entity menu in the menu bar, which makes it at the top.
| Item | What it makes |
|---|---|
| Create Empty | An entity named Entity with a Transform. |
| 3D Object | Cube, Sphere, Capsule, Cylinder, Plane or Quad, drawn with the engine's own mesh and a white material. The cube, sphere and quad are a unit across; the capsule and cylinder a unit across and two high; the plane ten units square. |
| 2D Object | Sprite, the shapes Square, Circle, Capsule, Triangle and Hexagon, and Tilemap. See Sprites and Tilemaps. |
| Light | Directional Light, Point Light, Spot Light, Point Light 2D, Spot Light 2D and Global Light 2D. See Lights and 2D lights. |
| Audio | Audio Source. See Audio sources. |
| Effects | Particle Emitter, Particle Emitter 2D, Particle Plane, Particle Force Field, Trail, Trail 2D, Line and Line 2D. See Particle Emitter, Trail, Line and Force Field. |
| UI | UI Document and UI Panel. See UI documents. |
| Camera | Camera, Camera 2D and Camera Bounds 2D. See Cameras. |
Items your game's code and its packages add come after these, a package's under its name (see Plugins).
Two keys make an empty entity from anywhere in the editor:
- Ctrl+Shift+N makes one at the top of the scene.
- Alt+Shift+N makes one under the entity picked last. The Entity menu calls it Create Empty Child.
A new entity is the open scene's, saved with it. Under a parent it sits at the parent's place; at the top it sits at the origin. A directional light comes turned to shine down at a slant and casts shadows, and a spot light points down. A name its siblings have already gets a number: a second Point Light is Point Light (1). The new entity is picked, and its name is ready to type over. One Ctrl+Z takes it away.
Rename
Press F2, or choose Rename in a row's menu. A box takes the place of the name, with all of it selected. Enter, or a click elsewhere, gives the name you typed; Escape keeps the old one. An empty name takes the name away, and the row reads as the entity's number.
You can also rename the picked entity in the name box at the top of the Inspector.
Duplicate
Ctrl+D, or Duplicate in a row's menu or the Edit menu, copies the picked entities and everything under them, with every value they hold. Each copy goes right after its original and is numbered after its name: a copy of Cube is Cube (1), and a copy of Cube (1) is Cube (2). The entities under it keep their names. A reference inside a copy to an entity in what was copied points to the matching entity in the copy. The copies are picked.
A copy of an instance of a prefab is another instance of the same prefab.
Delete
Delete, or Delete in a row's menu, takes the picked entities out of the world with everything under them. Nothing is asked, since one Ctrl+Z puts all of it back where it was, with every value it held.
The engine's own entities cannot be deleted, nor the parts a prefab put in one of its instances; the item is grayed and says why.
Cut, copy and paste
| Item | Key | What it does |
|---|---|---|
| Cut | Ctrl+X | Marks the picked entities, drawn faint, to be moved by the next paste. Escape lets go of them. |
| Copy | Ctrl+C | Keeps the picked entities and everything under them as they are now, to paste as often as you like. |
| Paste | Ctrl+V | Puts a copy, or what was cut, last among the siblings of the picked entity, or at the top with nothing picked. |
| Paste Special ▸ Paste as Child (Keep Local Transform) | Ctrl+Shift+V | Puts it under the picked entity, with the local transform it had. |
| Paste Special ▸ Paste as Child (Keep World Transform) | Puts it under the picked entity, where it was in the world. |
Pasted beside an entity, a copy keeps the local transform it had; pasted at the top, it lands where the original was in the world. A pasted entity keeps its name where nothing beside it has that name, and is numbered where something does. What is pasted is picked, and each paste is one Ctrl+Z. A paste at the top goes into the scene of the entity picked.
What the Hierarchy copies stays in the editor: it is not put on your computer's clipboard. The Inspector copies values to the clipboard; see The clipboard.
The row's menu holds Cut, Copy, Paste, Paste Special, Rename, Duplicate, Delete and Select All, then the items that make entities, then Prefab with Open Prefab, Unpack and Unpack Completely (see Nested instances and unpacking). A grayed item says why when you rest the pointer on it.
Arrange by dragging
Drag a row onto another row to put the entity under it, or between rows to put it in another place:
- Onto the middle of a row, it becomes that row's last child, and the row is outlined.
- Onto the top or the bottom edge of a row, it goes beside it, and a line shows where, at the depth it lands at.
- Below every row, it goes last at the top of the scene.
A drag carries every picked row when it starts on one of them. The entity keeps its place in the world: its transform is worked out against its new parent, and one Ctrl+Z puts it back with the transform it had.
A row cannot be dragged:
- while the Hierarchy is searched, since it shows only part of the tree;
- into another scene;
- under itself or anything under it;
- when it is a part a prefab put in one of its instances, or one of the engine's own.
The pointer says why while you hold it over a place it cannot go. Anything else can go inside an instance of a prefab, where it is the scene's addition to it.
Drag rows onto a folder of the Project panel to make prefabs of them (see Make a prefab and place instances), or onto an entity field in the Inspector to set it.
Drop files from the Project panel
Drag a file from the Project panel onto a row to put what it makes under that row, or below the rows to put it at the top:
| File | What it makes |
|---|---|
| A prefab or a model | An instance of it, named after the file. |
| An image, or one slice of an image | A sprite that draws it, named after the file or the slice. |
| Several images or slices together | A sprite that plays them as frames, with an Animator, and a clip and a controller made beside the first image. See Sprites. |
| A material, onto a row | The entity is drawn with that material. |
What a dropped file makes is picked, but not given a name to type.
Search
Type in the search box to list only the entities that match. Every word must match, case is ignored, and the rows above each match are listed too, faint, so you can see where it is.
| Type | To find |
|---|---|
cube | Entities with "cube" in their name |
#412 | Entity 412, as an entity with no name reads |
t:spin | Entities carrying a component with "spin" in its name |
t=Transform | Entities carrying exactly that component |
t:spin cube | Entities that match both |
type: and type= work as t: and t=. A component of your game's is found by t= with or without its namespace: t=Wobble finds MyGame.Wobble. Resting the pointer on the empty box shows these examples.
While you search, the arrows are hidden, rows cannot be dragged, and what is picked stays picked even when it is not listed. Clear empties the search and gives back the tree as it was.
A prefab open on its own
When you open a prefab on its own, the Hierarchy lists only its entities. A button at the top, ‹ and the scene's name, takes you back to the scene, asking first about the prefab's changes. What you make or drop goes under the prefab's top entity. A model's prefab opened this way is marked read-only. See Edit a prefab on its own.
In the Scripting API
- Schedule.EntityMenu: an item of your own in the Entity menu and the Hierarchy's menu.
- EditorSelection: what is picked in the editor, as a system reads it.
