Spawns items at the position and orientation of the spawner. More...
Public Member Functions | |
void | DropToFloor () |
Drops this spawner to the floor, offset by spawnHeight. | |
void | Awake () |
Validates the state of this spawner at startup. | |
void | xOnDrawGizmos () |
Editor GUI drawing method for all spawners. | |
void | xOnDrawGizmosSelected () |
Editor GUI drawing method for selected spawners. | |
Public Attributes | |
float | respawnTime = 10 |
The time in seconds to wait before respawning a destroyed object. | |
GameObject | prefab |
The object of which to spawn copies. | |
Color | color = Color.cyan |
float | spawnHeight = 1 |
The height above the ground to position this spawner when applying the Drop To Floor context item. | |
bool | dropToFloor = false |
Whether to position on the floor, offset by spawnHeight. |
Spawns items at the position and orientation of the spawner.
Items that are spawned and later destroyed will respawn a set period after being destroyed.
This class triggers an OnSpawn event
void ObjectSpawner.Awake | ( | ) |
Validates the state of this spawner at startup.
void ObjectSpawner.DropToFloor | ( | ) |
Drops this spawner to the floor, offset by spawnHeight.
void ObjectSpawner.xOnDrawGizmos | ( | ) |
Editor GUI drawing method for all spawners.
void ObjectSpawner.xOnDrawGizmosSelected | ( | ) |
Editor GUI drawing method for selected spawners.
bool ObjectSpawner.dropToFloor = false |
Whether to position on the floor, offset by spawnHeight.
GameObject ObjectSpawner.prefab |
The object of which to spawn copies.
float ObjectSpawner.respawnTime = 10 |
The time in seconds to wait before respawning a destroyed object.
float ObjectSpawner.spawnHeight = 1 |
The height above the ground to position this spawner when applying the Drop To Floor context item.