|
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.
|
Authoring-time spawn suggestion placed in the scene to guide where enemies can appear. More...
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. | |
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:
|
private |
Unregisters this hint (and clears any reservation) when the component is disabled.
|
private |
Registers this hint with the global registry when the component is enabled.
| 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.
| float MegaCrush.Spawner.EnemySpawnHintPoint.maxPlayerDist = 0f |
Maximum distance from the player for this hint to be eligible; 0 disables the upper bound.
| float MegaCrush.Spawner.EnemySpawnHintPoint.minPlayerDist = 12f |
Minimum distance from the player for this hint to be eligible.
| int MegaCrush.Spawner.EnemySpawnHintPoint.overrideAreaMask = 0 |
Optional NavMesh area mask override for this hint. If 0, the spawner's global mask is used.
| float MegaCrush.Spawner.EnemySpawnHintPoint.radius = 2f |
Visual radius for this hint (and optional local sampling radius if your game uses it for effects/Gizmos).
| 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).
| 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.
| float MegaCrush.Spawner.EnemySpawnHintPoint.weight = 1f |
Optional weight for custom selection strategies (not used by the built-in locator).