Use Prefabs in a Scene
Prefabs let you reuse prepared voxel content from Prefab Packages.
You can drag a Prefab into a Voxel Scene to create a new Voxel Layer or insert the Prefab directly into the active Voxel Layer.
Why This Matters
Prefabs are useful for reusable props, modular pieces, repeated details, and prepared scene elements.
Instead of rebuilding the same voxel content by hand, you can keep it in a shared Prefab Package and use it whenever you need it.
Foxel can use a Prefab in two main ways:
- Place as New Layer creates a separate Voxel Layer.
- Insert into Active Layer copies the Prefab's voxel data into the active Voxel Layer.
Opening A Prefab Package
Prefabs are managed on the Prefabs page.
On the Prefabs page:
- The left side shows available Prefab Packages.
- The right side shows the Prefabs of the currently open package.
To open a package, double-click it on the left side.
The Prefabs inside that package appear on the right.
Placing A Prefab As A New Layer
To place a Prefab as a new layer:
- Open the Prefabs page.
- Open a Prefab Package.
- Drag a Prefab from the right panel into the Scene View.
- Drop it on the ground or on an object that is not the active Voxel Layer.
Foxel creates a new Voxel Layer from the Prefab.
The new layer is a separate scene object. You can move it, transform it, edit it, hide it, or delete it independently.
Use this when the Prefab should remain separate from the layer you are currently editing.
Inserting A Prefab Into The Active Layer
If a Voxel Layer is active, you can insert a Prefab directly into that layer.
To insert a Prefab into the active layer:
- Activate the Voxel Layer you want to edit.
- Drag a Prefab from the Prefabs page into the Scene View.
- Drop it onto a voxel of the active layer.
Foxel copies the Prefab's voxel data into the active Voxel Layer.
In this mode:
- No new object is created.
- The Prefab becomes regular voxel data inside the active layer.
- The Prefab origin is placed at the target grid cell.
Use this when you want to build directly inside one Voxel Layer instead of creating a separate object.
Using The Prefab Origin
Prefab placement uses the origin that was defined when the Prefab was created.
When placing a Prefab as a new layer, the Prefab origin is placed at the drop position.
When inserting a Prefab into the active layer, the Prefab origin is placed at the target grid cell.
This makes the Prefab origin important for predictable placement.
Color And Material Remapping
During placement, Foxel remaps the Prefab's colors and materials to the target asset.
This allows Prefabs from shared packages to be reused in assets with different Color Palettes and Material Sets.
The placed result uses the target asset's palette and material setup.
Using Modifier Keys
You can hold modifier keys while dropping a Prefab.
| Modifier | Result |
|---|---|
| No modifier | Places the Prefab at the drop position. If the target is the active Voxel Layer, the Prefab is inserted into that layer. Otherwise, a new Voxel Layer is created. |
Shift | Aligns the Prefab to the hovered face. |
Ctrl | Parents the created Voxel Layer to the hovered object while keeping its visible placement. |
Shift + Ctrl | Aligns the Prefab to the hovered face and parents the created layer to the hovered object. |
Alt | Forces placement as a new Voxel Layer, even when the Prefab could be inserted into the active layer. |
Use Shift when you want the Prefab to follow the direction of a wall, ceiling, side face, or other voxel surface.
Use Ctrl when the placed Prefab should move, rotate, or animate together with another object.
Use Alt when Foxel would insert the Prefab into the active layer, but you want to keep it as a separate layer instead.
What To Remember
- Prefabs are stored in Prefab Packages.
- Drag a Prefab into the Scene View to use it.
- Dropping on the ground or another object creates a new Voxel Layer.
- Dropping onto the active Voxel Layer inserts the Prefab into that layer.
- Prefab placement uses the Prefab origin.
- Foxel remaps colors and materials to the target asset.
- Shift aligns the Prefab to the hovered face.
- Ctrl parents the created layer to the hovered object.
- Alt forces placement as a new Voxel Layer.
Quick Summary
Use Place as New Layer when you want a Prefab to become a separate object.
Use Insert into Active Layer when you want the Prefab to become part of the Voxel Layer you are currently editing.