SpawnOptions
What a spawn takes beside its prefab: a pose and the traits that go over the prefab’s.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
body? |
BodyOptions |
A body over the prefab’s, its kind among it. |
collider? |
ColliderDeclaration |
Colliders over the prefab’s. |
name? |
undefined |
Only a prefab has a name, which is how a spawn tells the two apart. |
position? |
PositionInput |
- |
rotation? |
RotationInput |
- |
scale? |
ScaleInput |
- |
traits? |
readonly ConfigurableTrait[] |
Traits over the prefab’s, field by field: HealthTrait({ current: 10 }) over the prefab’s HealthTrait({ current: 30, maximum: 30 }) keeps its maximum of 30, as a Unity prefab override changes one field. Each spawn copies each record. |