Skip to main content

GlobalPopulationsManager

A class in Root.Township, Alta.Populations.

Scene entity that runs the GlobalPopulationDefinition assets on the server: initializes them, starts them once the server has booted, and cleans them up when destroyed.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private GlobalPopulationDefinition[] populationsThe global population assets this manager runs.

Methods​

MemberWhat it is
override void Initialize()Server: initializes every population and waits for BootupFinished to start them.
2 private and internal methods
MemberWhat it is
private void OnSceneDestroy(NetworkEntity entity, bool isUnload)Cleans every population when the entity is destroyed.
private void StartUp()Starts every population once the server finishes booting.