spawn
# Spawn System
Configure weighted random spawning, alive limits, intervals, and spawn radius with SpawnGroup ScriptableObject assets. Multiple Spawner instances can run independently in the same scene.
Structure
Quick Start
1. Create a SpawnGroup
Create -> AchUtils/Spawn/Spawn Group
2. Place a Spawner
Create an empty scene object and add Spawner.
3. Control Spawning
4. Control All Spawners
API
Spawner
SpawnSystem
SpawnGroup.Entry
Spawn Logic
- Run every
SpawnInterval. - If alive count is below
MaxAlive, select an entry withPickRandom(). - Instantiate
Random.Range(Min, Max + 1)objects. - Place objects within
SpawnRadiususingRandom.insideUnitCircle.
Multiple Spawners
Each Spawner is independent and can use different groups and settings.
Object pooling
For high-frequency spawns, connect this system to an object pool through Spawner.OnSpawned and OnDespawned.