Skip to main content

Replace Prefab

Replace Prefab swaps every copy of one prefab for another prefab. Each new copy goes where the old one was, turned the same way. Use it to change all the rocks of one kind, or to try another model across a whole map.

Open it with ToolsPrefabsReplace Prefab or the Replace Prefab button on the tool bar. It opens as a panel.

The Replace Prefab panel with rock_formation_small_a to replace with rock_formation_small_b

How to replace a prefab​

  1. Pick the prefab to replace. You can:
    • pick it in the In This Map list, which shows each prefab in the map and how many copies there are, most used first;
    • select a copy in the scene, then click the slot under the list ("Use selected, or drop a prefab here");
    • drag a prefab from the Content Browser onto the slot.
  2. Pick the new prefab in the With section. Drag a prefab from the Content Browser onto the slot ("Drop a prefab here from the content browser"), or select a prefab in the scene and click the slot.
  3. Set the options.
  4. Read the line under the button. It says how many copies will be replaced.
  5. Click Replace. The old copies are deleted and the new ones are selected. The line says "Replaced ... prefabs with ...".

The whole swap is one undo step. Replace Prefab never changes the parts of a placed monument.

tip

While the panel is open, right-click a prefab in the Content Browser and pick Replace this prefab or Replace with this prefab to fill a slot.

Options​

OptionWhat it does
In This MapThe prefabs in the map and how many there are. The list always counts the whole map. Click Refresh (the button beside it) to count again.
Whole Map / SelectionReplace in the whole map, or only in the selected objects and everything under them.
MoveMoves each new prefab along its own X, Y and Z axes, in meters. The distance is multiplied by the old copy's scale.
TurnTurns each new prefab around its own axes, in degrees.
ScaleMultiplies the size of each old prefab. 1, 1, 1 keeps the size.
Keep CategoryOn: the new prefab takes the old one's category. Off: it gets "Decor". On by default.

What is kept​

The new copy takes the old copy's place in the Hierarchy (its parent and its place in the list), its children and its name. Nothing else is copied: settings you made in the Inspector (custom data, building grade, sign pictures, IO settings), wires to the old copy, and the lock state are lost. Locked copies are replaced too.

warning

Replace Prefab does not copy the old copies' settings. Check the result before you save, and press Ctrl+Z if it is not what you wanted.

Messages​

MessageWhat it means
"Pick the prefab to replace and the new prefab"One of the slots is empty.
"The new prefab is the same prefab"Both slots hold the same prefab.
"There are no copies of that prefab here"The map (or the selection) has no copies of the prefab to replace.
"Select a prefab in the scene first"You clicked a slot with no prefab selected. This message shows in the Notifications panel, not in the panel.