Table of Contents

Class MonsterPool

Namespace
GrindFest
Assembly
GrindFest.dll
public class MonsterPool : Singleton<MonsterPool>
Inheritance
object
MonsterPool
Inherited Members

Fields

DefaultDropTable

Methods

Awake()
Despawn(GameObject)
GenerateRandomAffixes(int, MonsterRank)
GetAllMonsterNames()

All monster names known to the content index (prompts, suggestions, listings).

GetMonsterPrefab(string)

Monster prefab by name for a caller that must have it now. Throws when it is not resident: nothing loads synchronously any more, and a caller that cannot wait is a caller whose content has to be declared in the scope that needs it (see Get<T>(string)).

Knows(string)

Whether the content database knows a monster by this name.

A caller needs this to tell the two failures apart: a name the index has never heard of is a content gap, while a known name that will not resolve is a cold cache — and those want opposite fixes. Three DevTests reported "not found in content" for a monster that was in the index all along and merely not resident, which sent two debugging sessions to the catalogue (measured 2026-09-19).

RequestMonsterPrefab(string, Action<MonsterRankBehaviour>)

"Spawn it when the prefab is ready" — the form a spawner should use.

A resident prefab calls back immediately (same frame, no ordering change), so the common case pays nothing; a miss loads asynchronously and the spawn happens a frame or two later instead of blocking. That is what makes "no preload" true rather than aspirational: the first Skeleton in an area arrives a little late, every one after it is instant.

SpawnMonster(MonsterRankBehaviour, Vector3, int, MonsterRank, List<MonsterAffix>, Action<MonsterRankBehaviour>)
SpawnNearPlayer(string, string)
SpawnRandomMonstersAroundPosition(MonsterRankBehaviour, Vector3, int, MonsterRank, int, int)
TryGetMonsterPrefab(string, out MonsterRankBehaviour)

Resolves a monster prefab by name WITHOUT loading anything: true only when its prefab is already resident. Callers that can wait use RequestMonsterPrefab(string, Action<MonsterRankBehaviour>); callers that cannot handle a miss use GetMonsterPrefab(string), which throws.