Skip to main content

SpawnIfEmpty

A class in Root.Township, the global namespace.

Server: makes the SpawnerBase on the same object spawn once if the entity loaded with no children, waiting for a chunk if needed.

Constructors​

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

Methods​

MemberWhat it is
override void InitializeAsServer(SpawnData spawnData)If the entity has no children, spawns now or after it joins a chunk.
1 private and internal method
MemberWhat it is
private void AddedToChunk(Chunk chunk)Runs the spawner once the entity has been added to a chunk.