Skip to content

Prefabs

A prefab is an asset that stores a block group (including props) so you can place it many times. Make anything that repeats, such as houses, streetlights and towers, into a prefab. Copies placed as links all change at once when you edit the original prefab.

MethodAction
Window › PrefabsOpens the Prefabs panel (library).
Content BrowserFind them under Prefabs in the source tree on the left (folders by tag).
Tools › Save selection as prefabSaves the current selection as a prefab right away.
Double-click a prefabOpens the prefab edit window (from both the Prefabs panel and the Content Browser).
  1. Box-select the building to save with the Selection tool (Q).
  2. In the Save selection group of the Prefabs panel (Window › Prefabs), type a name and tags, then press Save selection.
  3. Choose the prefab in the list and press Place (or drag it into the viewport).
  4. Click the viewport to place it. R = rotate, F = flip, Esc = stop.
  5. After placing, the tool switches to Selection and the placed copy is selected. Move it right away with W · E · R.
  6. To edit, double-click the prefab, edit it in the edit window and press Save. All linked placed copies change.
MethodResult
Prefabs panel Save selectionSaves with a Name and Tags (comma-separated).
Tools › Save selection as prefabSaves right away with the name “Prefab MMdd_HHmm”. Rename it later.
Outliner right-click Save as prop (prefab)Saves only that actor’s blocks and props as a prefab. Cells of other actors within the bounds are left out.
Model import Convert to blocksConverts an external model to vanilla blocks and saves it as a prefab (tag Model conversion) (Importing custom models).

If the selection contains no blocks, nothing is saved.

InputAction
Prefabs panel Place · edit window PlaceStarts placement mode.
Drag from the Prefabs panel or Content Browser into the viewportStarts placement mode at that spot.
ClickPlaces with the pivot at the cell under the mouse. After placing, the tool switches to Selection.
Shift+clickPlaces and stays in placement mode (place several).
R · FRotate 90° · flip left/right (block orientations too)
EscEnd placement

Each placed prefab is one actor in the Outliner.

This is the Placement options group of the Prefabs panel.

FieldDefaultMeaning
Place as linkOnKeeps the placed copy linked to the original. When the original is saved, it updates too.
Clear with empty cellsOffEmpty cells (air) in the prefab remove existing blocks at that spot.
Place props tooAlso places the props contained in the prefab.
Keep edited blocksDuring bulk updates, cells you edited after placing are left as they are.
  1. Edit one copy placed as a link directly in the world.
  2. Put the mouse cursor over it.
  3. Press Update from the one under the cursor in the Prefabs panel.
  4. The prefab is saved as a new revision and all linked copies are updated. Undo it with a single Ctrl+Z.

Opens when you double-click a prefab or press Edit in the panel. It is a floating window you can move outside the editor.

Since 0.9.10: The left side of the edit window is a real 3D edit viewport instead of a picture. The old routine of placing a prefab → cutting a hole → reselecting and saving is now done in one window.

This is a separate world containing only the prefab’s blocks. It works independently of the main world and the main undo history. The main world does not change until you save.

Top rowMeaning
7 tool buttonsPlace 1 · Break 2 · Eyedropper 3 · Select 4 · Shape 5 · Brush 6 · Fill 7
Block to place · Main blockBlock to place in this window (including state). Main block = take the current block from the main screen
ViewUnlit (F2) · Lit (F1) · Wireframe (F3) · Game view (F6) · Path tracing (F7)
  • When first opened, the view is Unlit. The prefab’s minimum corner sits at the floor grid (0, 0, 0).
  • Camera controls are the same as in the main viewport.
Key (when the window has focus)Action
1 – 7 · Q · TabSwitch tools
W · E · RRegion gizmo (when there is a selection)
R · Shift+R · X · Shift+X · URotate · flip
Arrow keys · PgUp · PgDn · KMove · array
Del · Ctrl+C · Ctrl+X · Ctrl+V · Ctrl+I · Ctrl+ADelete · copy · cut · paste · invert · all
[ · ]Brush · shape size
F · G · HFrame · grid · hide
F1 – F7View mode
Ctrl+Z · Ctrl+YUndo · redo within this window
EscCancel drag → clear selection
TabContents
PrefabsName · tags · pivot · bake orientation · block list · size and revision info
ToolsBlock state · pattern · shape · brush · fill · selection operations · replace blocks (same as the main Tools panel)
Prefabs tab fieldMeaning
Name · TagsSeparate tags with commas (e.g. castle wall, medieval).
Pivot (placement anchor) X · Y · ZThe cell in the prefab that lands on the cursor cell when placing. Bottom center = the center of the bottom
Bake orientationRotate Y 90° · Flip left/right — saves the blocks rotated or flipped (changes the default orientation when placing).
BlockList of counts per block type. Change the chosen block (to another block) · Delete (to air)
Bottom buttonAction
SaveSaves as a new revision of the same prefab. If blocks changed, placed copies linked in the world are updated too.
PlaceSaves, then starts placement mode.
Duplicate as new prefabSaves as a different prefab (links stay with the original).
Export to fileExports as a single .npprefab file.
CloseIf there are unsaved changes, asks Discard and close or Keep editing.
  • If you change only the pivot and save, copies already placed stay where they are.
  • Updated placed copies remain in the actor they originally belonged to.
  • A prefab with no blocks cannot be saved.
  • Saving a prefab does not overwrite it; it creates a new revision (r2, r3 …). A new file such as <name>_v2.npprefab is created.
  • The library shows only the highest revision of each prefab. Old revision files remain in the folder.
  • Rename: Name in the Prefabs panel (F2) or Content Browser right-click Rename. It becomes a new revision of the same prefab, and links with placed copies are kept.
What you wantHow
ExportPrefabs panel Export · edit window Export to file · Content Browser right-click Export to file… (choose several to export to a folder)
ImportChoose a .npprefab file with Prefabs panel Import or Content Browser Import

Import follows these rules.

CaseResult
Prefab not seen beforeAdded to the library.
Higher revision of the same prefabUpdated to the latest.
Same or lower revision of the same prefabAdded as a copy without overwriting.
SettingWhereMeaning
Place as link · Clear with empty cells · Place props too · Keep edited blocksPrefabs panel › Placement optionsThe “Placement options” table above
Name · TagsPrefabs panel › Save selectionName and tags of the new prefab
Search · TagsTop of the Prefabs panelFilter by name and tag
Pivot · Bake orientationEdit window › Prefabs tabPlacement anchor and default orientation
KeyAction
R · F (while placing)Rotate · flip
Shift+click (while placing)Keep placing
Esc (while placing)End placement
F2Rename (Prefabs panel · Content Browser)
Double-click · EnterOpen the edit window

For keys inside the edit window, see the “3D edit viewport” table above.

  • Prefab files are saved in prefabs/ in the project folder. If the world has not been saved yet, they are saved in the user folder (%APPDATA%\NPEditor\prefabs).
  • Link information is saved in the world file (.npworld). If you move only the prefab files to another PC, the links do not follow.
  • One prefab can be up to about 16.77 million blocks.
  • With Inserted modules in Face extrude, you can insert a prefab into a wall every N blocks.
  • Undo in the prefab edit window works only inside the window. Updates applied to the world by saving are undone with Ctrl+Z in the main window.