Runtime Spawner 1.2.5
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.ISpawnLocator Interface Reference

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...

Inheritance diagram for MegaCrush.Spawner.ISpawnLocator:
MegaCrush.Spawner.SpawnLocator

Public Member Functions

void Configure (LayerMask mask, float minSpawnRange, float cullDistance, string[] navmeshAreas)
 Configures sampling parameters and NavMesh area mask.
 
Vector3 FindForGlobal (Vector3 playerPos)
 Finds a NavMesh-valid position for global spawning around the player.
 
Vector3 FindForRegion (Bounds regionBounds, float regionHeight, Vector3 playerPos)
 Finds a NavMesh-valid position inside a region’s bounds.
 
Vector3 FindForWave (Transform spawnPoint, float spawnRange, Vector3 playerPos)
 Finds a NavMesh-valid position near a specific wave/special anchor point.
 
Vector3 FindNearParent (Vector3 parentPos, Vector3 playerPos)
 Finds a NavMesh-valid position near a group parent (for clustered spawns).
 

Detailed Description

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.

Member Function Documentation

◆ Configure()

void MegaCrush.Spawner.ISpawnLocator.Configure ( LayerMask mask,
float minSpawnRange,
float cullDistance,
string[] navmeshAreas )

Configures sampling parameters and NavMesh area mask.

Parameters
maskPhysics layers considered as ground when raycasting down.
minSpawnRangeMinimum allowed distance from the player.
cullDistanceMax search radius around the player for global placement.
navmeshAreasOptional NavMesh area names to restrict placement.

Implemented in MegaCrush.Spawner.SpawnLocator.

◆ FindForGlobal()

Vector3 MegaCrush.Spawner.ISpawnLocator.FindForGlobal ( Vector3 playerPos)

Finds a NavMesh-valid position for global spawning around the player.

Parameters
playerPosWorld position of the player.

Implemented in MegaCrush.Spawner.SpawnLocator.

◆ FindForRegion()

Vector3 MegaCrush.Spawner.ISpawnLocator.FindForRegion ( Bounds regionBounds,
float regionHeight,
Vector3 playerPos )

Finds a NavMesh-valid position inside a region’s bounds.

Parameters
regionBoundsRegion world-space AABB.
regionHeightY height to apply after placement (for visual consistency).
playerPosWorld position of the player.

Implemented in MegaCrush.Spawner.SpawnLocator.

◆ FindForWave()

Vector3 MegaCrush.Spawner.ISpawnLocator.FindForWave ( Transform spawnPoint,
float spawnRange,
Vector3 playerPos )

Finds a NavMesh-valid position near a specific wave/special anchor point.

Parameters
spawnPointAnchor transform.
spawnRangeRadius to sample around the anchor.
playerPosWorld position of the player.

Implemented in MegaCrush.Spawner.SpawnLocator.

◆ FindNearParent()

Vector3 MegaCrush.Spawner.ISpawnLocator.FindNearParent ( Vector3 parentPos,
Vector3 playerPos )

Finds a NavMesh-valid position near a group parent (for clustered spawns).

Parameters
parentPosWorld position of the group parent.
playerPosWorld position of the player.

Implemented in MegaCrush.Spawner.SpawnLocator.


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