Spawner
A class in Root.Township, the global namespace.
Server: spawns count copies of one prefab, or random picks from a distribution, at its spawn points. A component on a networked prefab.
- Listed in Global namespace: S
- Inherits or implements
SpawnerBase
Constructors
| Member | What it is |
|---|---|
Spawner() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|---|
private int count | How many to spawn (5 by default). |
private Distribution distribution | Distribution to pick prefabs from when prefab is not set, using the chunk's spawn attributes. |
private bool isAllSame | When true, picks one prefab and spawns it once with a count of count instead of picking each time. |
private NetworkPrefab prefab | Fixed prefab to spawn. Use this or distribution, not both. |
Methods
Used in
Members of other types that take, return or hold a Spawner: