GymnasiumStaticContentSpawner
A class in Root.Township, the global namespace.
Gymnasium-only component that forces AdditionalStaticContent to spawn in its chunks once they finish loading. It removes itself when baked into any other scene.
Constructors
| Member | What it is |
|---|
GymnasiumStaticContentSpawner() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private Chunk[] chunks | Chunks whose static content should be forced to spawn. |
private const string GymnasiumSceneName | The scene name Gymnasium. |
Properties
| Member | What it is |
|---|
int SortingOrder { get; } | Bake order; always 0. |
Methods
| Member | What it is |
|---|
void Bake(bool isSaving) | Does nothing. |
void Clean() | Build step: destroys this component unless its scene name contains Gymnasium. |
3 private and internal methods
| Member | What it is |
|---|
private void ForceSpawnStaticContentInChunk(Chunk chunk) | Instantiates the content of every AdditionalStaticContent on the entities in the loaded chunk. |
private void OnDisable() | Unhooks from the chunks' FullyLoaded events. |
private void Start() | Hooks ForceSpawnStaticContentInChunk to each listed chunk's FullyLoaded event. |