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.
| Method | Action |
|---|
| Window › Prefabs | Opens the Prefabs panel (library). |
| Content Browser | Find them under Prefabs in the source tree on the left (folders by tag). |
| Tools › Save selection as prefab | Saves the current selection as a prefab right away. |
| Double-click a prefab | Opens the prefab edit window (from both the Prefabs panel and the Content Browser). |
- Box-select the building to save with the Selection tool (Q).
- In the Save selection group of the Prefabs panel (Window › Prefabs), type a name and tags, then press Save selection.
- Choose the prefab in the list and press Place (or drag it into the viewport).
- Click the viewport to place it. R = rotate, F = flip, Esc = stop.
- After placing, the tool switches to Selection and the placed copy is selected. Move it right away with W · E · R.
- To edit, double-click the prefab, edit it in the edit window and press Save. All linked placed copies change.
| Method | Result |
|---|
| Prefabs panel Save selection | Saves with a Name and Tags (comma-separated). |
| Tools › Save selection as prefab | Saves 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 blocks | Converts 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.
| Input | Action |
|---|
| Prefabs panel Place · edit window Place | Starts placement mode. |
| Drag from the Prefabs panel or Content Browser into the viewport | Starts placement mode at that spot. |
| Click | Places with the pivot at the cell under the mouse. After placing, the tool switches to Selection. |
| Shift+click | Places and stays in placement mode (place several). |
| R · F | Rotate 90° · flip left/right (block orientations too) |
| Esc | End placement |
Each placed prefab is one actor in the Outliner.
This is the Placement options group of the Prefabs panel.
| Field | Default | Meaning |
|---|
| Place as link | On | Keeps the placed copy linked to the original. When the original is saved, it updates too. |
| Clear with empty cells | Off | Empty cells (air) in the prefab remove existing blocks at that spot. |
| Place props too | | Also places the props contained in the prefab. |
| Keep edited blocks | | During bulk updates, cells you edited after placing are left as they are. |
- Edit one copy placed as a link directly in the world.
- Put the mouse cursor over it.
- Press Update from the one under the cursor in the Prefabs panel.
- 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 row | Meaning |
|---|
| 7 tool buttons | Place 1 · Break 2 · Eyedropper 3 · Select 4 · Shape 5 · Brush 6 · Fill 7 |
| Block to place · Main block | Block to place in this window (including state). Main block = take the current block from the main screen |
| View | Unlit (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 · Tab | Switch tools |
| W · E · R | Region gizmo (when there is a selection) |
| R · Shift+R · X · Shift+X · U | Rotate · flip |
| Arrow keys · PgUp · PgDn · K | Move · array |
| Del · Ctrl+C · Ctrl+X · Ctrl+V · Ctrl+I · Ctrl+A | Delete · copy · cut · paste · invert · all |
| [ · ] | Brush · shape size |
| F · G · H | Frame · grid · hide |
| F1 – F7 | View mode |
| Ctrl+Z · Ctrl+Y | Undo · redo within this window |
| Esc | Cancel drag → clear selection |
| Tab | Contents |
|---|
| Prefabs | Name · tags · pivot · bake orientation · block list · size and revision info |
| Tools | Block state · pattern · shape · brush · fill · selection operations · replace blocks (same as the main Tools panel) |
| Prefabs tab field | Meaning |
|---|
| Name · Tags | Separate tags with commas (e.g. castle wall, medieval). |
| Pivot (placement anchor) X · Y · Z | The cell in the prefab that lands on the cursor cell when placing. Bottom center = the center of the bottom |
| Bake orientation | Rotate Y 90° · Flip left/right — saves the blocks rotated or flipped (changes the default orientation when placing). |
| Block | List of counts per block type. Change the chosen block (to another block) · Delete (to air) |
| Bottom button | Action |
|---|
| Save | Saves as a new revision of the same prefab. If blocks changed, placed copies linked in the world are updated too. |
| Place | Saves, then starts placement mode. |
| Duplicate as new prefab | Saves as a different prefab (links stay with the original). |
| Export to file | Exports as a single .npprefab file. |
| Close | If 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 want | How |
|---|
| Export | Prefabs panel Export · edit window Export to file · Content Browser right-click Export to file… (choose several to export to a folder) |
| Import | Choose a .npprefab file with Prefabs panel Import or Content Browser Import |
Import follows these rules.
| Case | Result |
|---|
| Prefab not seen before | Added to the library. |
| Higher revision of the same prefab | Updated to the latest. |
| Same or lower revision of the same prefab | Added as a copy without overwriting. |
| Setting | Where | Meaning |
|---|
| Place as link · Clear with empty cells · Place props too · Keep edited blocks | Prefabs panel › Placement options | The “Placement options” table above |
| Name · Tags | Prefabs panel › Save selection | Name and tags of the new prefab |
| Search · Tags | Top of the Prefabs panel | Filter by name and tag |
| Pivot · Bake orientation | Edit window › Prefabs tab | Placement anchor and default orientation |
| Key | Action |
|---|
| R · F (while placing) | Rotate · flip |
| Shift+click (while placing) | Keep placing |
| Esc (while placing) | End placement |
| F2 | Rename (Prefabs panel · Content Browser) |
| Double-click · Enter | Open 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.