Skip to main content

DestroyIfInIncorrectChunk

A class in Root.Township, the global namespace.

Server: destroys the entity if it ends up in a chunk that isn't a LocationChunk whose bounds contain it.

Constructors​

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

Methods​

MemberWhat it is
override void InitializeAsServer(SpawnData spawnData)Checks the current chunk and again every time the entity is added to a chunk.
1 private and internal method
MemberWhat it is
private void Check(Chunk chunk)Destroys the entity unless the chunk is a location chunk containing its position.