Skip to main content

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​

MemberWhat it is
GymnasiumStaticContentSpawner()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private Chunk[] chunksChunks whose static content should be forced to spawn.
private const string GymnasiumSceneNameThe scene name Gymnasium.

Properties​

MemberWhat it is
int SortingOrder { get; }Bake order; always 0.

Methods​

MemberWhat 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
MemberWhat 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.