scene_update_prefab
Modify an existing prefab in a save copy: change its scale, swap its displayed asset, or set base health. Keeps the prefab id, components, and attached graphs intact.
Instructions
Change a prefab that already exists, in a copy of a save: its scale, the asset it shows, or its health. The prefab keeps its id, its components (triggers, option tabs, variables, hurt boxes) and the graphs attached to it, so nothing has to be made or attached again and the graphs that create it stay as they are: the way to make a wall thicker, a coin smaller, or to give a station another look after seeing it in a playtest. prefab is its name or id (scene_list_prefabs). scale is a number or [x, y, z] (1 = the natural size of the asset; the result gives the size in metres). asset swaps the model of an object prefab for another object asset (id or unique name from scene_search_assets); mechanism assets, the ones with a preset status, and creatures cannot be swapped in or out. health is the base health, as in scene_add_prefab. The areas of the triggers and option tabs of a prefab grow with its scale, so look at them again after a change of scale. Entities that were placed in the editor from this prefab keep their own scale.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | No | ||
| scale | No | ||
| health | No | ||
| prefab | Yes | ||
| mapPath | No | ||
| outputName | No |