A simple data-driven wave spawner, spawn patterns, pooling, events and more. Easy to tune via ScriptableObjects.Wave Spawner System is a lightweight, data-driven framework for spawning enemy waves in Unity. It’s designed to be easy for designers to tune and easy for programmers to integrate — without hardcoding wave formulas.Waves are configured using ScriptableObjects (EnemyDefinition + WaveDefinition), allowing you to control difficulty scaling through AnimationCurves for budget, duration, spawn rate, and optional caps. The spawner supports multiple spawn patterns and spawn shapes, making it suitable for arena games, survival modes, tower defense variants, and roguelike-style encounters.To integrate cleanly into any project, the system exposes both C# events and UnityEvents (for non-coders), including wave start/end and enemy spawn notifications. It also includes optional boss waves, elite spawns, and special wave modifiers such as Rush, Tank, and Swarm, which apply configurable multipliers to your curves.For performance, the system includes an optional lightweight pooling component (warmup + auto-expand). And for editor usability, it ships with a custom inspector featuring validation warnings and a one-click “Generate Next Wave Preview” that displays computed values and a seeded simulation of enemy counts.Core FeaturesScriptableObject-based configurationEnemyDefinition: prefab, cost, weight, minWave/maxWaveWaveDefinition: curve-driven scaling, allowed enemy lists, modifiersCurve-based difficulty scalingBudget curve (points per wave)Duration curve (seconds per wave)Spawn rate curve (spawns/second)Optional caps via curves (max enemies per wave, max alive at once)Optional spawn pacing curve (multiplier over wave progress)Spawning SystemSpawn modesRound-robinRandomWeighted random (optional SpawnPoint weight component)Closest to target / Farthest from targetOutside camera / offscreen spawn (camera-aware)NavMesh-valid spawn (optional sampling)Spawn shapesPredefined spawn transformsRandom point in box (Bounds)Ring around target (inner/outer radius)Wave VarietyBoss wavesBoss every N wavesBoss can spawn at start or endOptional “boss consumes budget”Boss spawns in addition to normal wave enemiesElite spawnsSeparate elite enemy poolElite chance scales via curve and can occur on any wave typeSpecial wave modifiersRush (faster, shorter, lower budget)Tank (slower, fewer spawns, cost-biased toward expensive enemies)Swarm (faster, more spawns, cost-biased toward cheap enemies)Integration HooksC# events + UnityEventsOnWaveStarted(int wave)OnWaveEnded(int wave)OnEnemySpawned(GameObject enemy)OnAllEnemiesDefeated()Performance (Optional)Lightweight poolingPool warmup entriesAuto-expand toggleWorks with inactive-as-dead tracking for pooled enemiesEditor ToolsCustom inspectorOne-click Generate Next Wave PreviewDisplays computed values (duration, budget, spawn rate, caps, elite chance, special type)Seeded simulation for repeatable preview countsValidation warnings (missing wave definition, enemies, spawn points, target/camera, pooling setup)Requirements / NotesUses built-in Unity systems only (no third-party dependencies).NavMesh option uses UnityEngine.AI (only needed if you enable NavMesh sampling).Editor tooling is included in an Editor/ folder (excluded from builds automatically).Compatible with any Render Pipeline (Built-in, URP, HDRP)




