Component image 
Spawn Or Destroy component as seen in the Scene Inspector

The SpawnOrDestroy component is part of the Undo system, and handles spawning and destruction of objects in the Undo system.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. |
Target
|
Worker | The target worker to use when executing. |
TargetParent
|
Slot | The parent of this object to restore it to. |
_onRestored
|
delegate of identity Action`1<Worker> | The sync delegate with this compoonent's worker passed as an object to trigger when the object is restored. |
_mode
|
SpawnOrDestroy.Mode | What mode to execute. |
_preserveAssets
|
Bool | Whether the destruction should preserve assets like meshes. |
_sendDestroyingEvents
|
Bool | Whether to send destruction events when destroying. |
_savedObject
|
Uri | The URI of the saved object. |
_isComponent
|
Bool | Whether this is in component form or internal to the engine. |
_referenceTable
|
SavedReferenceTable | The place to store destroyed object data in order to restore the object later. |
_isSaving
|
Bool | Whether this component is saving object data. |
_description
|
String | The description of the object. |
_performed
|
Bool | Whether this component is finished executing it's function. |
Usage
Examples
Used to restore objects destroyed via undoable protoflux actions or context menu, or for undoing spawning of objects.