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

Authoring-time spawn suggestion placed in the scene to guide where enemies can appear. More...

Inheritance diagram for MegaCrush.Spawner.EnemySpawnHintPoint:

Public Attributes

float radius = 2f
 Visual radius for this hint (and optional local sampling radius if your game uses it for effects/Gizmos).
 
float weight = 1f
 Optional weight for custom selection strategies (not used by the built-in locator).
 
float minPlayerDist = 12f
 Minimum distance from the player for this hint to be eligible.
 
float maxPlayerDist = 0f
 Maximum distance from the player for this hint to be eligible; 0 disables the upper bound.
 
bool denyLineOfSight = true
 If true, the hint is rejected when the player has a clear line of sight to it. LOS uses SpawnHintSettings.losBlockMask.
 
bool requireNavMesh = true
 If true, the candidate position must be validated against the NavMesh near this hint (projection distance controlled by SpawnHintSettings.navSampleMaxDist).
 
string[] tags
 Optional semantic tags (e.g., "Flank", "Ambush"). When a spawn request provides tags, the locator first tries to match hints that share at least one tag.
 
int overrideAreaMask = 0
 Optional NavMesh area mask override for this hint. If 0, the spawner's global mask is used.
 

Private Member Functions

void OnEnable ()
 Registers this hint with the global registry when the component is enabled.
 
void OnDisable ()
 Unregisters this hint (and clears any reservation) when the component is disabled.
 

Detailed Description

Authoring-time spawn suggestion placed in the scene to guide where enemies can appear.

Hints are queried by the locator (see ISpawnLocator / SpawnLocator) using parameters from SpawnHintSettings. When enabled/disabled, this component automatically registers/unregisters itself with SpawnHintRegistry.

Typical usage:

  1. Add several hints to tiles or areas that play well for combat encounters.
  2. Adjust minPlayerDist, maxPlayerDist, and denyLineOfSight to prevent pop-in or too-close spawns.
  3. Optionally tag hints via tags and request those tags from wave anchors.

Member Function Documentation

◆ OnDisable()

void MegaCrush.Spawner.EnemySpawnHintPoint.OnDisable ( )
private

Unregisters this hint (and clears any reservation) when the component is disabled.

◆ OnEnable()

void MegaCrush.Spawner.EnemySpawnHintPoint.OnEnable ( )
private

Registers this hint with the global registry when the component is enabled.

Member Data Documentation

◆ denyLineOfSight

bool MegaCrush.Spawner.EnemySpawnHintPoint.denyLineOfSight = true

If true, the hint is rejected when the player has a clear line of sight to it. LOS uses SpawnHintSettings.losBlockMask.

◆ maxPlayerDist

float MegaCrush.Spawner.EnemySpawnHintPoint.maxPlayerDist = 0f

Maximum distance from the player for this hint to be eligible; 0 disables the upper bound.

◆ minPlayerDist

float MegaCrush.Spawner.EnemySpawnHintPoint.minPlayerDist = 12f

Minimum distance from the player for this hint to be eligible.

◆ overrideAreaMask

int MegaCrush.Spawner.EnemySpawnHintPoint.overrideAreaMask = 0

Optional NavMesh area mask override for this hint. If 0, the spawner's global mask is used.

◆ radius

float MegaCrush.Spawner.EnemySpawnHintPoint.radius = 2f

Visual radius for this hint (and optional local sampling radius if your game uses it for effects/Gizmos).

◆ requireNavMesh

bool MegaCrush.Spawner.EnemySpawnHintPoint.requireNavMesh = true

If true, the candidate position must be validated against the NavMesh near this hint (projection distance controlled by SpawnHintSettings.navSampleMaxDist).

◆ tags

string [] MegaCrush.Spawner.EnemySpawnHintPoint.tags

Optional semantic tags (e.g., "Flank", "Ambush"). When a spawn request provides tags, the locator first tries to match hints that share at least one tag.

◆ weight

float MegaCrush.Spawner.EnemySpawnHintPoint.weight = 1f

Optional weight for custom selection strategies (not used by the built-in locator).


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