Code Reference‎ > ‎SpawnPool‎ > ‎

.prefabPools[]

class prefabPools["prefabName"] : IDictionary<stringPrefabPool>

Returns a Transform.

Description
Access a PrefabPool for a particular prefab in a SpawnPool.

It is rare that this level of access is needed but can be handy in certain situations. Some of the common reasons to access PrefabPools in your code are to get the number of spawned, despawned or total instances for a particular prefab.

Note the use of square brackets when providing the name of a prefab:

PrefabPool cubePool = PoolManager.Pools["Shapes"].prefabPools["Cube"];
Debug.Log("Number of Cubs spawned: " + cubePool.spawned.Count);