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.SpawnHintSettings Class Referencesealed

Global configuration for the Spawn Hints system. More...

Inheritance diagram for MegaCrush.Spawner.SpawnHintSettings:

Public Attributes

bool hintOnly = false
 If true, spawns will ONLY use EnemySpawnHintPoint. If no suitable hint is found, the placement is skipped (no sampler fallback).
 
bool ignoreGlobalMinDistance = true
 When true, the locator ignores the spawner’s global “Min Spawn Range” for hint evaluation. Useful when your hints are intentionally closer than the global minimum.
 
float cellSize = 16f
 Bucket size (meters) for the registry’s spatial hash grid. Larger cells = fewer buckets, smaller cells = tighter queries.
 
float waveSearchPadding = 4f
 Extra meters added around a Wave’s range when searching nearby hints.
 
float regionSearchPadding = 4f
 Extra meters added around a Region’s bounds when searching nearby hints.
 
float globalSearchFraction = 0.75f
 Fraction of the spawner’s Cull Distance used to form the global hint search radius.
 
float navSampleMaxDist = 35f
 Maximum search distance for NavMesh.SamplePosition(Vector3, out NavMeshHit, float, int) when snapping a hint to the NavMesh.
 
LayerMask losBlockMask = ~0
 Physics layers that block line of sight between player and candidate. Used when a hint has “deny line of sight” enabled.
 
float reservationSeconds = 1.0f
 Soft cooldown per hint so consecutive spawns don’t all land on the same point.
 
bool preferScopedFirst = true
 If true, prefer hints that are inside a “local scope” (Wave/Region) before searching globally.
 
int maxHintAttempts = 16
 Upper bound on how many hint candidates are evaluated per query before giving up (or falling back).
 
bool debugLogs = false
 If enabled, prints detailed logs about hint acceptance/rejection and fallback behavior.
 

Detailed Description

Global configuration for the Spawn Hints system.

Assigned on the RuntimeSpawner (Inspector or via RuntimeSpawner.Locator/ISpawnLocator.ConfigureHints) to control how EnemySpawnHintPoint are searched, validated, and temporarily reserved during placement.

The settings are consumed by SpawnHintRegistry and the locator’s hint query path. Typical workflow:

  1. Create a settings asset (Assets → Create → Runtime Spawner → Spawn Hint Settings).
  2. Assign it to your RuntimeSpawner and enable “Use Spawn Hints”.
  3. Author several EnemySpawnHintPoint in your scene.

Member Data Documentation

◆ cellSize

float MegaCrush.Spawner.SpawnHintSettings.cellSize = 16f

Bucket size (meters) for the registry’s spatial hash grid. Larger cells = fewer buckets, smaller cells = tighter queries.

◆ debugLogs

bool MegaCrush.Spawner.SpawnHintSettings.debugLogs = false

If enabled, prints detailed logs about hint acceptance/rejection and fallback behavior.

◆ globalSearchFraction

float MegaCrush.Spawner.SpawnHintSettings.globalSearchFraction = 0.75f

Fraction of the spawner’s Cull Distance used to form the global hint search radius.

◆ hintOnly

bool MegaCrush.Spawner.SpawnHintSettings.hintOnly = false

If true, spawns will ONLY use EnemySpawnHintPoint. If no suitable hint is found, the placement is skipped (no sampler fallback).

◆ ignoreGlobalMinDistance

bool MegaCrush.Spawner.SpawnHintSettings.ignoreGlobalMinDistance = true

When true, the locator ignores the spawner’s global “Min Spawn Range” for hint evaluation. Useful when your hints are intentionally closer than the global minimum.

◆ losBlockMask

LayerMask MegaCrush.Spawner.SpawnHintSettings.losBlockMask = ~0

Physics layers that block line of sight between player and candidate. Used when a hint has “deny line of sight” enabled.

◆ maxHintAttempts

int MegaCrush.Spawner.SpawnHintSettings.maxHintAttempts = 16

Upper bound on how many hint candidates are evaluated per query before giving up (or falling back).

◆ navSampleMaxDist

float MegaCrush.Spawner.SpawnHintSettings.navSampleMaxDist = 35f

Maximum search distance for NavMesh.SamplePosition(Vector3, out NavMeshHit, float, int) when snapping a hint to the NavMesh.

◆ preferScopedFirst

bool MegaCrush.Spawner.SpawnHintSettings.preferScopedFirst = true

If true, prefer hints that are inside a “local scope” (Wave/Region) before searching globally.

◆ regionSearchPadding

float MegaCrush.Spawner.SpawnHintSettings.regionSearchPadding = 4f

Extra meters added around a Region’s bounds when searching nearby hints.

◆ reservationSeconds

float MegaCrush.Spawner.SpawnHintSettings.reservationSeconds = 1.0f

Soft cooldown per hint so consecutive spawns don’t all land on the same point.

◆ waveSearchPadding

float MegaCrush.Spawner.SpawnHintSettings.waveSearchPadding = 4f

Extra meters added around a Wave’s range when searching nearby hints.


The documentation for this class was generated from the following file: