Prefab Splines
RustEdit ProA prefab spline places prefabs for you: in a row along the line, such as a fence or lamp posts, or scattered inside a closed line, such as a forest. The prefabs come from a prefab profile. While Live is on, RustEdit makes them again each time you change the spline or a setting.

Before you start
- You need RustEdit Pro or higher. Without it, the prefab types are not in the type dropdown, the settings of prefab splines in a scene cannot be changed, and no prefabs are made.
- Make a prefab profile with the prefabs you want, with their weights and random scale and rotation. See Prefab Profiles.
How to place prefabs along a spline
- Make a spline entity and draw the line. For an area, close the spline. See Editing Splines.
- In the Inspector, click Prefab in the component buttons.
- In the Splines table, pick a Type in the spline's row: Prefab Line or Prefab Area.
- Click the row. Its Settings tab shows.
- Drag a prefab profile from the Content Browser, folder Profiles > Prefab Profiles, onto Prefab Profile. Or click Prefab Profile and pick one. The profile's prefabs are copied into the spline. With Live on, the prefabs are made.
- Change the options until the layout looks right.
Where the prefabs go
- The made prefabs are normal prefabs. In the Hierarchy they are under the spline entity, in an empty object for each spline, named after the spline entity and the spline, for example "Spline prefabs 1". So they move, hide and lock with the spline entity.
- They are saved and exported like any other prefab. When you open a map exported with In RustEdit data, the prefabs come back in their group, and the prefab spline takes them back as its own.
- A scene saved by an older version has the group at the top of the Hierarchy. It moves under its spline entity when you open the scene.
The types
| Type | What it does |
|---|---|
| Prefab Line | Places prefabs along the line, a set distance apart: on the line, on one side, or on both sides. |
| Prefab Area | Scatters prefabs inside the closed line. Areas of the same entity marked as Hole keep them out. |
Options
| Option | Types | What it does |
|---|---|---|
| Prefab Profile | All | The prefab profile the spline places. Its prefabs and weights are copied into the spline. When you save the profile in the Prefab Profile Editor, the spline takes the new prefabs at once, and with Live on makes them again. Right-click it for Open in Editor and Clear. |
| Spacing | Line | Meters between two prefabs along the line. |
| Side | Line | Meters to the side of the line. |
| Both Sides | Line | Places a row of prefabs on each side of the line. The second row is turned half a turn, so the two rows point opposite ways. Needs Side above 0. |
| Follow Line | Line | Prefabs turn with the line, not at random. The random Y turn of the prefab profile is left out. |
| Turn | Line | With Follow Line on, degrees added to the turn of every prefab. A piece that stands across the line instead of along it needs a Turn of 90. Chainlink fence pieces run along the line at 0. |
| Density | Area | Prefabs for each 1000 square meters. |
| Hole | Area | This area places nothing and keeps the other areas of the entity out. |
| Min Gap | Area | The least meters between two prefabs. |
| Jitter | All | Random meters each prefab moves. |
| Max Slope | All | The steepest ground a prefab goes on, in degrees. |
| On Ground | All | Prefabs sit on the ground, not at the line's height. |
| Seed | All | Another number gives another random layout. The same seed gives the same layout. |
| Live | All | The prefabs are made again by themselves when the spline or a setting changes. |
| Make Prefabs | All | Makes the prefabs again now. |
| Remove Prefabs | All | Removes the made prefabs. |
The label at the top shows how many prefabs the profile has, its name, and how many prefabs are made.
The prefab profile also sets each prefab's own options: its weight, whether it is on, its scale range, height offset, random rotations and whether it tilts with the ground.
Live and hand changes
With Live on, the prefabs are made again a moment after your last change. While you hold a mouse button, for example while you drag a knot, RustEdit waits until you let go.
Making the prefabs again throws the old ones away. A prefab you moved or changed by hand is lost at the next change of the spline or its settings. To keep hand changes, turn Live off first, or move the prefabs out of the group.
Undo and delete
- Make Prefabs and Remove Prefabs are undo steps. Ctrl+Z puts the old prefabs back.
- Changes to the options rows are undo steps.
- With Live on, undoing a change to the knots makes the prefabs again from the old spline.
- When you delete a prefab spline entity, its made prefabs are deleted with it. One Ctrl+Z brings back the spline and its prefabs.
- When you give a spline another Type in the Splines table, or pick another component button (for example Path in place of Prefab), the prefabs it made are deleted. One Ctrl+Z brings back the type and the prefabs.
- A Prefab Line that becomes a Prefab Area, or back, keeps the options of all types: Prefab Profile, Jitter, Max Slope, On Ground, Seed and Live. The options of one type start at the new type's defaults. With Live on, it makes its prefabs again for the new type.
Copies
A copy of a prefab spline entity (Ctrl+D) copies its made prefabs too, under the copy. The copy uses its own prefabs from then on. It does not take over the prefabs of the spline it was copied from.
Tips
- An area with On Ground off places its prefabs at the average height of its line.
- One area can hold at most 20,000 prefabs.
- To clear a space in an area, add a second closed spline to the same entity, make it a Prefab Area and turn on Hole.