A class in Root.Township, the global namespace.
Local decoration spawner: when enabled, instantiates a random non-networked prefab at each point of the SpawnPositions on the same object, and removes them when disabled.
Constructors
| Member | What it is |
|---|
StaticPositionSpawner() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
Methods
3 private and internal methods
| Member | What it is |
|---|
private void Awake() | Caches the SpawnPositions component. |
private void OnDisable() | Destroys all child objects, including the spawned prefabs. |
private void OnEnable() | Spawns a random prefab from staticPrefabs at each spawn point. |