Manual
Manual
The Inspector
The Inspector shows what is picked and lets you change it: an entity's name, whether it is on and drawn, its layer and its components, or a file's import settings. This page covers the entity's header, the component sections, how each kind of field is edited, editing several entities at once, the clipboard and Add Component. Open it with Window ▸ Inspector (Ctrl+3).
On a Mac, Cmd takes the place of Ctrl in every shortcut on this page.
What it shows
| Picked | The Inspector shows |
|---|---|
| Nothing | Nothing selected. |
| An entity, in the Hierarchy or the Scene view | Its header, a section for each component, the material it is drawn with, and Add Component |
| Several entities | What they share, edited together; see Several entities at once |
| A file in the Project panel | Its kind, its address, and its import settings or what it holds; see Import settings |
| Several files | One set of import settings for several images or several models, or else a count of them by kind; see Several files at once |
Picking an entity lets go of a picked file, and the other way round: the Inspector shows one or the other.
The entity header
The first line holds, from the left, the active checkbox, the visibility eye, the name and Debug. Under it are the Layer row and, for an entity in an instance of a prefab, the Prefab row.
Active checkbox
Untick it to switch the entity off, with everything under it. A switched-off entity is not drawn, and no system sees it or updates it. Its row in the Hierarchy is faint. Your code does the same with world.SetActive. An entity that is ticked but sits under a switched-off parent says Switched off by something above it. under the header.
The visibility eye
The eye says whether the entity is drawn, as Bevy's Visibility on it says:
| The eye | Visibility | Means |
|---|---|---|
| Plain | Inherited | Drawn where what is above it is drawn. Every new entity starts here. |
| Struck through | Hidden | Not drawn, nor anything under it that is set to Inherited. |
| In the accent color | Visible | Drawn even under a hidden parent. |
| Dimmed | Inherited | Hidden by something above it, which a line under the header names: Hidden by Door above it. |
Click the eye to hide the entity, or to show it again as Inherited. The arrow beside it, or a right-click on it, picks one of the three.
The checkbox and the eye differ: the checkbox switches the entity off for everything, and the eye only stops it being drawn, while its systems still run. Your code does the same with world.SetVisibility, and reads it with world.VisibilityOf and world.HiddenBy.
Name
The name box renames the entity. Your change is given when you press Enter or click elsewhere, and is one Ctrl+Z. An entity with no name shows its number in the empty box, such as #12. Emptying the box takes the name away.
Debug
Debug switches the Inspector to the names the code uses; see The Debug view.
Layer
Layer is the layer the entity is on, one of the project's 32: what a camera's Culling Mask draws, and what physics and rays meet. The list shows each layer by its number and name, such as 8: Player, and Add Layer... opens Project Settings at Tags and Layers. When the entity has children, the editor asks whether to put them on the layer too: Yes, Change Children, No, This Entity Only or Cancel. See Layers.
Prefab
For an entity in an instance of a prefab, the Prefab row names the prefab, in teal, with Overrides ▾ and Open. See Overrides.
Component sections
Each component the entity carries has a section, headed by its name in words. Click a header to fold or unfold the section. The Transform comes first.
- The header's name. A component is named in words, as its fields are:
DirectionalLightis Directional Light. A component of your game's is named without its namespace, and the namespace is written at the right of the header. Where the words differ from the code's name, resting the pointer on the header shows the code's name. - The ? button, at the right end of the header, opens the component's page in this manual or in the Scripting API. A component of yours has one once it names a page (see Declaring a component).
- The header's menu. Right-click a header for Remove Component. Where something else on the entity needs the component, the item is grayed and says what depends on it. For a component an instance added to its prefab, the menu also has Revert and Apply. Items your code adds with
schedule.ComponentMenucome last, a package's under its name.
Some sections hold more than one component, such as Mesh 3D, which takes on the mesh and how it casts and receives shadows. A component that holds nothing shows an empty section.
Lines under a header
A section can start with a line about the component, with an info icon, saying what it will do that its fields alone do not, such as a collider on a moving body using its mesh's hull. These lines come from the game's or a package's editor code (schedule.NoteInEditor).
A component whose code is gone, after you deleted or renamed its script, says No code declares Wobble any more. Its values are kept, grayed, and are its again once something declares it.
Components the Inspector cannot show are named in a line at the bottom: 2 components are not shown here yet, followed by their names. The Debug view lists them.
Edit in the Scene view
Some components have a button at the top of their section, such as Edit Collider on a 2D collider. On, it puts dots on the component's shape in the Scene view to drag; see Edit a component's shape.
Fields
Names as words
A field's name is written as words, whatever the code calls it:
| In the code | In the Inspector |
|---|---|
shadowDepthBias, shadow_depth_bias | Shadow Depth Bias |
m_Speed, _speed | Speed |
fov | FOV |
HDRColor | HDR Color |
item1 | Item 1 |
size2D | Size 2D |
Each word starts with a capital, a run of capitals stays one word, and short forms such as FOV, HDR, UI, ID and UV are written in capitals. An enum's values are written as words too: WindowSize is Window Size. Rest the pointer on a name to see what the code calls it, and the field's [Tooltip], if it has one.
Two columns
Each row has the field's name on the left and its value on the right. The name column is a little under half the panel's width, so a narrow panel still leaves room for the value. Rest the pointer on a name cut short to see all of it.
Numbers
Drag a number box left or right to change it, or click it to type a value. A drag moves a decimal number by 0.01 for each pixel, ten times faster with Shift held and a hundred times slower with Alt; a whole number moves by 1, and faster once it is large. What you type is kept as typed. A number is shown to seven significant digits.
A field with [Range(min, max)] is a slider with a number box beside it, and stays inside the range whether you drag or type. A whole number slides in whole steps.
Vectors and rotations
A vector is a box for each axis, each after its letter: X, Y, Z and W. The Transform's Rotation is three angles in degrees, X, Y and Z, turned in the order Z, X, then Y. A drag turns it by half a degree for each pixel, and an angle you type is kept as you typed it, so 190 stays 190.
Checkboxes and choices
- A
boolis a checkbox. - An enum is a list of its values' names, saved as the value's number.
- A
[Flags]enum is a list of ticks, under Nothing and Everything; it stays open while you tick. - A Rust enum whose variants hold values shows the fields of the variant picked under the list.
- A
LayerMaskis a list of the project's layers to tick, which reads Nothing, Everything, a layer's name, or Mixed... when several are ticked.
Text
A FixedText32 to FixedText256 field is a text box. What you type is given when you leave the box, as one change, and never runs longer than the field has room for. A SharedText field is a text box too, with room for 16,384 bytes. A LocalizedString field is a slot naming a string of the game's, Menu ▸ Play, picked or made in the popup a click on it opens.
Lists
A FixedList8<T> up to FixedList128<T> folds under its name. Open, it shows its size and its items, Element 0, Element 1 and on. + adds an item, a copy of the last, and - takes the last away; or type a size. A list never holds more than its room. A list component is shown the same way, as Items, with no room to run out of.
Structs
A field that is a struct of your own folds under its name; open, it shows each of its fields on a row. A struct of two to four numbers named as axes, such as x, y and z, r, g, b and a, or min and max, is one row of boxes instead.
Slots
A field that names an asset, a file or an entity is a slot: a box with the kind's icon and what it holds, such as None (Prefab) when it holds nothing, or Missing (Prefab) in the warning color when what it named is gone.
- Drag a file from the Project panel onto it, or an entity from the Hierarchy onto an entity slot. A slot takes only what fits it: a
FileRefwith[FileKind(".abynav")]takes only files with that ending. - The button at its right end lists what it can hold, to pick one: the project's files of that kind, the built-in meshes for Mesh, or the scene's entities for an entity slot, with a search box.
- Click the slot to show its file in the Project panel, marked for a moment without picking it, so the Inspector stays where it is. Double-click it to pick the file. A click on an entity slot shows the entity in the Hierarchy.
A slot changes every entity picked as one change. The slots that name what an entity is drawn as and with, Mesh in Mesh 3D and Material in Mesh Material 3D, are covered in Meshes and materials. The material's own values are shown at the foot of the Inspector, under its name.
Colors
A color is a swatch, its alpha a bar along its bottom. An HDR color, one that can be brighter than white, has HDR written on it. Click the swatch to open the picker under it:
- the color it opened with beside the color now; click the first to put it back;
- a square and a hue bar;
- sliders and number boxes for RGB 0-255, RGB 0-1.0 or HSV, picked from a list;
- Hexadecimal, six digits, or eight with alpha;
- for an HDR color, Intensity: each step of the slider gives twice the light of the step before, with five swatches under it from two stops darker to two stops brighter.
The color changes as you pick it. Enter, or a click outside the picker, keeps it, and the whole pick is one Ctrl+Z. Escape puts back the color it opened with. A Vector3 or Vector4 field with [ColorUsage] is shown as a color (see Declaring a component).
Several entities at once
Pick several entities and the Inspector edits them together. It shows the entity picked last, with only the sections all of them have.
- A value they differ in shows a dash: a number box, one angle of a rotation, a list of choices, a slot, the layer, a color as a gray swatch, the name as an empty box, a checkbox as a bar.
- An edit is made to each of them, by its own values. An angle you type turns each about that axis and keeps its own other two angles; a camera made orthographic keeps its own clipping planes.
- Add Component lists what not all of them carry, and adds it to each one that lacks it. Remove Component takes it off all of them, or off none while something on one of them depends on it.
- A component only some of them carry is named at the bottom: Light is on only some of them, so it is not shown.
However many entities it reaches, each change is one Ctrl+Z.
The clipboard
What the Inspector copies goes on your computer's clipboard, so you can paste it into any program, and paste values copied elsewhere. Right-click a row's name for Copy and Paste of the row's value, or right-click a number box for its number alone. A rotation has Copy Euler Angles and Copy Quaternion.
Click a row's name, and Ctrl+C and Ctrl+V copy and paste its value. While you type in a box, they copy and paste its text.
Values are copied as text:
| Value | Copied as |
|---|---|
| A number | 0.1, -3 |
| A checkbox | True, False |
| A vector | Vector3(1,2.5,-3) |
| A rotation | Quaternion(x,y,z,w), or its angles as a Vector3 |
| A color | #80FFFF, with two more digits for an alpha below 1; an HDR color as Color(r,g,b,a) |
| A Rust enum's variant | Enum:Hidden |
Paste sets the value on every entity picked, as one Ctrl+Z. It is grayed when the clipboard holds nothing that fits, and resting on it says why, such as The clipboard holds no Vector3: it takes one as Vector3(x,y,z). A color pastes from #RGB, #RRGGBB, #RRGGBBAA or Color(r,g,b,a).
Your game's code reads and writes the same clipboard with SystemClipboard.Text.
Add Component
Add Component, at the bottom of the Inspector, opens a list of every component that can be added, with a search box. Type part of a component's name in words or as the code writes it; every word must match. Enter adds the first line, and a click adds any line. Each line shows its namespace, or where it comes from, on its right.
The list leaves out what the entity carries already. A component that needs others brings them with it, and one Ctrl+Z takes away all that the add put on. A field given a value where it is declared starts at that value.
Undo
Every change in the Inspector is one step of the undo: a drag from press to release, a value typed, a color picked, a component added or removed. Ctrl+Z takes it back, and Ctrl+Y or Ctrl+Shift+Z puts it back. The Edit menu names the step, such as Undo Transform.translation.x.
The Debug view
Debug shows the entity as the code sees it: every component it carries, under the name the code gives it, and every field as plain numbers and names, fields marked [HideInInspector] included. The values Bevy works out for itself, such as a camera's matrices or a GlobalTransform, are there too, grayed, since they are not set by hand. Debug stays on until you switch it off, and is kept when the editor closes.
In the Scripting API
- AbyssComponentAttribute: a component, and the page its ? opens.
- RangeAttribute, TooltipAttribute, HideInInspectorAttribute and ColorUsageAttribute: how a field is shown.
- FixedList8<T>, EntityRef, PrefabRef, FileRef, FileKindAttribute and LayerMask: fields shown as lists, slots and layers.
- World.SetActive, World.SetVisibility and EntityVisibility: the active checkbox and the eye, from code.
- Schedule.NoteInEditor and Schedule.ComponentMenu: a line under a component, and an item in its header's menu.
- SystemClipboard: the clipboard, from code.
