Editor

Prefabs

EditorPreview

Editor docs

A prefab is a .prefab.json file: an entity tree you place in scenes as instances. An instance records only what you changed on it, its overrides. The editor creates prefabs from entities, applies an instance's overrides to its prefab or reverts them, and opens a prefab on its own. The editor is a preview.

Preview: Create, Apply and Revert shipped on 3 November 2026, editing an instance in the Inspector on 4 November. Apply, Revert and Open Prefab were tried in a running editor; editing an instance's components, in the Inspector or over MCP, has not been yet.

Place a prefab#

Drag the prefab from Assets into the scene view or the Hierarchy. The Hierarchy marks an instance root with a ◆ before its name. When the prefab's file changes, every instance in the open scene reloads it in place and keeps its overrides. An instance whose prefab changed after its overrides were recorded is marked Prefab changed in the Inspector.

Edit an instance in the Inspector#

Select an instance root, and the Inspector shows its effective components: the prefab root's components with the instance's overrides applied, as the engine merges them, then any component of the instance's own. Editing a prefab's component edits the instance, never the prefab file:

  • A changed field, the enable toggle, Paste values and Reset to defaults are written as overrides on the instance, one undo step each. Setting a field back to the prefab's value removes its override.
  • A field an override sets is marked (override) after its label, and so is a section's title when the override sets its enabled state.
  • A component that an override adds is marked (added by override) and is read-only.
  • On an instance root, Add Component is replaced by a note, Remove component is refused with a note, and Move up and Move down are disabled: its components come from the prefab. Open the prefab to add or remove one.

The prefab row above the components keeps Open Prefab, and Apply to prefab and Revert to prefab once the instance has overrides (below).

Create a prefab from an entity#

Select the entity and choose Edit → Create Prefab from Entity, or Create Prefab in the Inspector's prefab row. The editor writes the entity and its children as assets/<name>.prefab.json, named after the entity (<name> 2, <name> 3… when the name is taken), with the entity as its single root at the origin. In the scene, the entity becomes an instance of the new prefab, in the same place, under the same parent.

That is one undo step. Undo brings the entity back as it was; the prefab file stays.

Apply and revert#

On an instance root that has overrides, the Inspector's prefab row offers:

ButtonWhat it does
Apply to prefabWrites the instance's overrides into the prefab file, with the engine's own apply, then removes them from the instance. Other instances without overrides take the new prefab.
Revert to prefabRemoves every override from the instance, in one undo step.

When nothing can be applied, nothing is written. Overrides the engine skips stay on the instance, and the Console says why. Every outcome is a Console line.

Open a prefab on its own#

Open Prefab in the Inspector's prefab row, or Open Prefab in the Assets panel's context menu or a double click on a .prefab.json, opens the prefab in place of the scene. Edit it like a scene; Save writes the prefab file. If the open scene has unsaved edits, the editor asks you to save it first. To go back, open the scene from Assets (Open Scene, or a double click).

Known limitations#

  • Create Prefab has no name or folder dialog: the file goes to the root of assets/. It is not in a Hierarchy context menu. References from the rest of the scene to the new prefab's children or components no longer resolve (the entity's own references do); the engine reports them when the scene loads.
  • Apply to prefab applies every override; there is no per-override choice. Undo of an Apply brings the overrides back but does not restore the prefab file. If the prefab changes on disk between the read and the write, the write wins.
  • There is no "back to the scene" button after Open Prefab.
  • The Inspector edits single-root prefabs only. A prefab with several roots (its entities become the instance's children) or whose root is itself an instance shows a "not supported yet" note, and the overrides on those children cannot be edited from the Inspector or over MCP.
  • A prefab component an override removed cannot be brought back from the Inspector; Revert to prefab brings it back with every other override undone.
  • An override written by hand below a field (one element of an array, say) becomes a whole-field override the next time you edit that field.
  • Entity and component references inside the prefab's own values are shown with the prefab file's uids, not the ones the engine gives each copy.
  • Agents place prefabs over MCP (ignifx_instantiate_prefab) and set an instance's values with ignifx_set_props (see Agents and MCP), but there are no MCP tools for apply, revert or opening a prefab yet.