Periodic loop that manages spawning in active LocalAreaSpawner regions. Ensures each active region maintains its local population between its min/max bounds.
More...
|
| RegionSpawnLoop (RuntimeSpawner owner, ISpawnExecutor exec, PopulationTracker pop) |
| Constructs a region spawn loop bound to a spawner.
|
|
IEnumerator | Run (List< LocalAreaSpawner > activeRegions, int maxPopulation) |
| Coroutine that runs continuously while RuntimeSpawner.UseRegionSpawners is enabled. For each active region, spawns up to the region’s configured MinObjectCount /MaxObjectCount , while respecting the global maxPopulation cap. Entries that enable group spawning will spawn additional members parented to the initial object.
|
|
Periodic loop that manages spawning in active LocalAreaSpawner regions. Ensures each active region maintains its local population between its min/max bounds.
◆ RegionSpawnLoop()
Constructs a region spawn loop bound to a spawner.
- Parameters
-
owner | Owning RuntimeSpawner providing context and settings. |
exec | Executor responsible for performing spawns. |
pop | Population tracker used for caps and bookkeeping. |
◆ Run()
IEnumerator MegaCrush.Spawner.RegionSpawnLoop.Run |
( |
List< LocalAreaSpawner > | activeRegions, |
|
|
int | maxPopulation ) |
Coroutine that runs continuously while RuntimeSpawner.UseRegionSpawners is enabled. For each active region, spawns up to the region’s configured MinObjectCount
/MaxObjectCount
, while respecting the global maxPopulation cap. Entries that enable group spawning will spawn additional members parented to the initial object.
- Parameters
-
activeRegions | List of regions currently active (player inside). |
maxPopulation | Hard cap across all alive spawned objects. |
◆ _exec
◆ _owner
◆ _pop
The documentation for this class was generated from the following file:
- D:/projects/Asset Store Packages/com.pixelwizards.runtimespawner/Code/Runtime/Internals/SpawnLoops/RegionSpawnLoop.cs