Skip to main content

ForestPopulationCreator

A class in Root.Township, Alta.Forests.

Spawns a population folder in each forest chunk as it generates, sized to the chunk area.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private PopulationSetup definitionPopulation setup used.
private float densityPopulation density.
private NetworkPrefab prefabPrefab with a BasicPopulationFolder.

Methods​

2 private and internal methods
MemberWhat it is
private void Awake()Hooks the parent forest generator's GeneratedDynamic.
private void Create(LocationChunk chunk)Spawns the prefab in the chunk and sets up its BasicPopulationFolder as an ecosystem.