A class in Root.Township, the global namespace.
Generation part that spawns one network prefab at its position (or at a random one of its randomParent transforms) when the generator runs. Server side, as part of world generation.
Constructors
| Member | What it is |
|---|
SpawnerPart() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private ObjectPipeline prefab | Object pipeline that resolves to the NetworkPrefab to spawn. |
private Transform[] randomParent | Optional spawn points; one is picked at random and the spawned entity is parented to it. |
Properties
| Member | What it is |
|---|
NetworkEntity LastSpawned { get; private set; } | The entity spawned by the last GenerateDynamic call. |
Methods
| Member | What it is |
|---|
override void GenerateDynamic(GenerationCore core) | Picks a prefab from the pipeline and spawns it at the chosen transform, as a child of the chunking parent if there is one, else in the chunk. |
Used in
Members of other types that take, return or hold a SpawnerPart: