Skip to main content

PopulationFolder<TThis, TData>

A class in Root.Township, Alta.Populations.

Base for population folders with their own save data type. Saves and loads the population sample and the spawn point of each saved child.

Constructors​

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

Methods​

MemberWhat it is
protected virtual void LoadSetup(TData data)Override to read extra settings from the save. Called first in load.
protected virtual void SaveSetup(TData data)Override to write extra settings to the save.
protected virtual void SerializeSetup(Stream stream)Override hook to stream settings. Nothing in this build calls it.
1 private and internal method
MemberWhat it is
private void Registerchild(NetworkPrefab child, NetworkEntity parent, int childIndex)Links a loaded child to its saved spawn point entry and moves it to the spawner's default folder.