Skip to main content

SpawnConstrain

An abstract class in Root.Township, Alta.Caves.

Base asset for a rule that limits what a ConstrainedSpawnerDisplay spawns in a cave chunk, such as EveryXLayersConstrain. Checked on the server before spawning.

Constructors​

MemberWhat it is
protected SpawnConstrain()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Methods​

MemberWhat it is
abstract bool SpawnParameters(GenerationBase generation, ref int quantity)Returns false to stop the spawn for this chunk's generator. Can also change the quantity to spawn.

Used in​

Members of other types that take, return or hold a SpawnConstrain: