Using Prefabs โ
Prefab Packages are shared resources that can be browsed and used from the Prefabs page of the workspace.
On the Prefabs page:
- the left side shows available Prefab Packages
- the right side shows the Prefabs of the currently open package
For an overview of workspace pages, see Pages.
Importing a Prefab Package โ
To import one or more Prefab Packages:
- Open the Prefabs page.
- Use the package controls on the left side.
- Click Import Packages.
- Select the package files you want to import.
Imported packages are copied into Foxel's shared files folder.
Opening a Prefab Package โ
To open a package, double-click it on the left side of the Prefabs page.
The right side then displays all Prefabs contained in that package.
Using a Prefab โ
To use a Prefab, drag it from the Prefab list into the Scene View.
Foxel can use a Prefab in two ways:
- Place as New Layer creates a new Voxel Layer from the Prefab.
- Insert into Active Layer copies the Prefab's voxel data into the active Voxel Layer.
During placement, the Prefab's colors and materials are remapped to the target asset. This allows Prefabs from shared packages to be reused in assets with different Color Palettes and Material Sets.
Place as New Layer โ
If you drop a Prefab on the ground or on an object that is not the active Voxel Layer, Foxel creates a new Voxel Layer containing the Prefab data.
The new layer is added to the scene as a separate object and can be moved, transformed, edited, hidden, or deleted independently.
Use this when the Prefab should remain a separate scene object.
Insert into Active Layer โ
If a Voxel Layer is active and you drop the Prefab onto a voxel of that same layer, Foxel inserts the Prefab into the active layer's voxel grid.
In this mode:
- no new object is created
- the Prefab's voxel data is copied into the active Voxel Layer
- the Prefab origin is placed at the target grid cell
- the inserted voxels become regular voxel data inside the active layer
Use this when you want to build directly inside the active Voxel Layer instead of creating a separate layer.
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.
Drag and Drop Modifiers โ
You can hold modifier keys while dropping a Prefab to control how it is placed.
| 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 become part of another object's hierarchy. This is useful when the Prefab should move, rotate, or animate together with the hovered object.
Use Alt when Foxel would insert the Prefab into the active layer, but you want to keep it as a separate layer instead.