Method SetParent
SetParent(uint, uint, bool, uint, bool)
Set the parent of an occurrence
Declaration
[HandleProcessCorruptedStateExceptions]
public void SetParent(uint occurrence, uint parent, bool addInParentInstances = false, uint insertBefore = 0, bool worldPositionStays = false)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | occurrence | The occurrence |
| uint | parent | The parent occurrence |
| bool | addInParentInstances | If True, each occurrence whose prototype is the target parent will generate a child whose prototype is the occurrence itself |
| uint | insertBefore | Add before this child occurrence in the children list of the parent occurrence |
| bool | worldPositionStays | If true, the parent-relative position, scale and rotation are modified such that the object keeps the same world space position, rotation and scale as before. |