A class in Root.Township, the global namespace.
Static generation step that instantiates a plain (non-networked) prefab under itself, then runs static generation on the new object. Driven by StaticGenerationHelper.
Constructors
| Member | What it is |
|---|
StaticGeneration() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private GameObjectDistribution options | Obsolete prefab distribution, only used when prefab has no input. |
private GeneratedPositioning positioning | Optional GeneratedPositioning that tweaks the spawn position and rotation. |
private ObjectPipeline prefab | Pipeline that picks the GameObject prefab to instantiate. |
private GameObject spawned | The object this component instantiated last. |
Methods
2 private and internal methods
| Member | What it is |
|---|
private void IStaticGeneration.Generate(NetworkEntity dynamicParent, SpawnData spawnData) | Destroys any previous result, picks a prefab from prefab (or the obsolete options if the pipeline has no input), instantiates it here and generates its children. |
private void IStaticGeneration.Reset() | Destroys the spawned object. |