Skip to content

Population & Death

FishPopulationManager enforces the global ecosystem cap and tracks runtime statistics.

Counters

  • Living population
  • Total born
  • Total deaths
  • Available slots

Initial population is limited by EcosystemConfig.Maximum Total Population. Reproduction is limited by both the global cap and the profile's per-runtime-species population limit.

Because runtime identity comes from the config entry, Shark and Swordfish maintain separate limits even if they share the same behavior profile.

Death flow

  1. Ecology enters Dead.
  2. Movement is stopped or disabled.
  3. The configured animation controller receives the death event.
  4. Optional rolling and sinking are applied.
  5. The object is destroyed after Death Despawn Delay.

The population slot is released when death begins rather than after the visual delay.