Runtime Spawner 1.3.0
Generic Runtime spawn and instance pooling system for spawning random AI agents around a map. Works with ANY AI system easily.
Loading...
Searching...
No Matches
MegaCrush.Spawner Namespace Reference

Namespaces

namespace  Samples
 

Classes

class  EnemySpawnHintPoint
 Authoring-time spawn suggestion placed in the scene to guide where enemies can appear. More...
 
class  EnemySpawnHintPointInspector
 
class  FireSignalOnStart
 example to fire a signal for the wave table runner to control spawn waves More...
 
class  FireSignalOnTriggerExit
 
struct  FloatRange
 Serializable container for a floating-point range. Drawn in the Inspector with a min–max slider when annotated with MinMaxRangeAttribute. More...
 
class  GlobalSpawnLoop
 Periodic loop that maintains global population between configured bounds. Chooses random SpawnEntry items from the global list and spawns them via the owner’s executor, optionally spawning groups. More...
 
class  InspectorProperty
 
class  IntensityProfile
 Scriptable profile that defines how spawning intensity progresses over time or via manual steps. Each Step configures caps and rate multipliers applied by SpawnDirector. More...
 
class  IntensityProfileInspector
 
struct  IntRange
 Serializable container for an integer range. Drawn in the Inspector with a min–max slider when annotated with MinMaxRangeAttribute. More...
 
interface  IPoolAdapter
 Abstraction over the project’s pooling layer so the spawner system isn’t tightly coupled to a specific pool implementation. More...
 
interface  ISpawnExecutor
 Executes a spawn request for a given SpawnEntry using a provided context. More...
 
interface  ISpawnLocator
 Service that selects world positions for new spawns based on context (global, region, wave, or grouping near a parent) while respecting NavMesh constraints, player distance, and physics ground checks. More...
 
interface  ISpecialsTelemetry
 Provides runtime telemetry used by SpecialEncounterManager rule checks. Implement this in-game and supply it via inspector or code. More...
 
interface  IWaveExecutor
 Contract for any executor that can run a wave sequence. More...
 
class  LocalAreaSpawner
 Localized spawn volume that lets the system bias spawning when the player is inside the area. This component does not spawn on its own—it's driven by RuntimeSpawner via region-activation signals. More...
 
class  LocalAreaSpawnerInspector
 Custom inspector for the Local Area Spawner. More...
 
struct  LoopPolicy
 Per-wave loop configuration describing if/how a wave should repeat. More...
 
class  LoopPolicyDrawer
 
class  MinMaxRangeAttribute
 Attribute to draw a min–max slider in the Unity Inspector. Can be applied to:

  • Vector2 or Vector2Int fields.
  • Custom serializable structs with fields named min and max (float or int).
More...
 
class  MinMaxRangeDrawer
 
class  NavMeshPlacementPolicyDrawer
 
class  NavMeshReadyEnabler
 Keeps a NavMeshAgent disabled until a valid NavMesh position is found near the current transform. Safe with pooling. Works whether NavMesh is static or appears later via runtime baking. More...
 
class  PoolAdapter
 Default adapter that forwards calls to PoolManager from MegaCrush.ObjectPool. More...
 
class  PopulationTracker
 Tracks the current and historical population of spawned objects, including metadata and source breakdowns. More...
 
class  RegionSpawnLoop
 Periodic loop that manages spawning in active LocalAreaSpawner regions. Ensures each active region maintains its local population between its min/max bounds. More...
 
class  RuntimeSpawner
 Central coordinator for runtime spawning. Supports three spawn flows:

  • Global spawning – distributed across the world with population caps.
  • Region spawning – localized spawners that activate when the player enters a region.
  • Wave spawning – table-driven encounter waves triggered by WaveTrigger volumes.

Also provides optional internal culling beyond a configurable distance and integrates with an object pool. More...

 
class  RuntimeSpawnerInspector
 Custom Inspector for the Runtime Spawner. More...
 
class  RuntimeSpawnerMenu
 
class  RuntimeSpawnerSettings
 Global configuration asset for the Runtime Spawner system. Stores editor-only visualization colors and is saved as a project-wide ScriptableObject so all scenes share consistent debug styling. More...
 
class  RuntimeSpawnerSettingsProvider
 Draw the settings provider. More...
 
class  SignalBus
 Minimal, sticky signal bus used by WaveTableRunner's UntilSignal loop type. Signals are string IDs; once fired they remain "fired" until consumed or cleared. More...
 
struct  SpawnContext
 Immutable parameters describing where and why a spawn is occurring. Built by RuntimeSpawner and consumed by ISpawnExecutor. More...
 
class  SpawnDirector
 Drives spawn system intensity over time or via explicit steps. Applies values from an IntensityProfile to a bound RuntimeSpawner (population caps, spawn rates, etc.). More...
 
class  SpawnDirectorInspector
 
class  SpawnEntry
 Defines how a particular prefab can be spawned by the Runtime Spawner. More...
 
class  SpawnEntryInspector
 Custom Inspector for SpawnEntry. Now also exposes NavMesh placement options (Require / Prefer / Ignore). More...
 
class  SpawnerDiagnosticsHUD
 
class  SpawnExecutor
 Default implementation of ISpawnExecutor. Pulls instances from a pool, resolves placement via ISpawnLocator, applies the NavMeshPlacementPolicy from SpawnEntry, activates the instance, and updates population tracking. More...
 
class  SpawnHintRegistry
 Lightweight spatial index for EnemySpawnHintPoint. More...
 
class  SpawnHintSettings
 Global configuration for the Spawn Hints system. More...
 
class  SpawnHintSettingsInspector
 
class  SpawnLocator
 Default spawn locator that performs physics raycasts and NavMesh sampling to produce valid placement positions for spawned objects. More...
 
struct  SpawnMeta
 Metadata associated with a spawned object for bookkeeping and analytics. More...
 
class  SpecialEncounterManager
 Manages opportunistic “special” encounters driven by a SpecialProfile. Evaluates rules on an interval and, when conditions are met, spawns via the bound RuntimeSpawner using either tagged WaveSpawnPoint anchors or a radial fallback resolved by the Locator. More...
 
class  SpecialEncounterManagerInspector
 
class  SpecialProfile
 Collection of SpecialRule entries plus global constraints for the special-encounter system. More...
 
class  SpecialProfileInspector
 
class  SpecialRule
 Describes when and how to spawn a single special encounter. Evaluated by SpecialEncounterManager on a cadence, subject to intensity step, player/telemetry gates, and placement constraints. More...
 
class  SpecialsTelemetryProvider
 Abstract ScriptableObject base you can subclass to feed telemetry via the Inspector. More...
 
class  WaveEntry
 Configuration for a single wave of spawns. More...
 
class  WaveSpawner
 ScriptableObject that defines a sequence of WaveEntrys for spawning. More...
 
class  WaveSpawnerInspector
 
class  WaveSpawnLoop
 Default implementation of IWaveExecutor. Spawns a sequence of entries defined in a WaveEntry, using spawn points defined on the WaveTrigger. More...
 
class  WaveSpawnPoint
 Spatial anchor used by waves and specials for directed spawning. Provides a position and an optional spawn radius plus semantic tags (e.g., "Flank", "Ambush") that rules can match against. More...
 
class  WaveSpawnPointInspector
 
class  WaveTableRunner
 Executes a WaveSpawner definition once, honoring each WaveEntry's LoopPolicy. Each wave may run once, repeat a set number of times, repeat until a duration expires, or loop until a signal is received. More...
 
class  WaveTrigger
 Simple trigger volume that activates a WaveSpawner sequence when the player enters. Supports optional reactivation after a cooldown and editor helpers for authoring spawn points. More...
 
class  WaveTriggerInspector
 
class  WelcomeDialog
 
class  WindowOpener
 

Enumerations

enum  SpawnSource {
  Unknown , Global , Region , Wave ,
  Special
}
 Identifies the origin of a spawn request (for telemetry, tagging, and debugging). More...
 
enum  LoopType { None , Duration , MaxLoops , UntilSignal }
 Strategy for repeating a wave entry. More...
 
enum  NavMeshPlacementPolicy { Require , Prefer , Ignore }
 Placement options for NavMesh-aware spawning. More...
 

Enumeration Type Documentation

◆ LoopType

Strategy for repeating a wave entry.

Enumerator
None 

Run once (legacy behavior).

Duration 

Repeat until LoopPolicy.durationSeconds have elapsed.

MaxLoops 

Repeat a fixed number of times per wave.

UntilSignal 

Repeat until an external signal is received.

◆ NavMeshPlacementPolicy

Placement options for NavMesh-aware spawning.

Enumerator
Require 

Only place on a valid NavMesh now; otherwise defer and retry.

Prefer 

Place immediately, but keep the NavMeshAgent disabled until a NavMesh appears.

Ignore 

Do not enforce or project to the NavMesh.

◆ SpawnSource

Identifies the origin of a spawn request (for telemetry, tagging, and debugging).

Enumerator
Unknown 

No specific source (default/unspecified).

Global 

Spawn initiated by the global population loop.

Region 

Spawn initiated by a region (local/biome) spawner.

Wave 

Spawn initiated by a wave table via a WaveTrigger.

Special 

Spawn initiated by a special/encounter system.