Code Reference‎ > ‎SpawnPool‎ > ‎

.prefabs[]

class prefabs["prefabName"] : IDictionary<stringTransform>

Returns a Transform.

Description
Fast access to the prefab references cached in the spawn pool.

This is handy when you know the name of a prefab but don't have a reference. There is no measurable overhead to using this.

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

Transform cubePrefab   = PoolManager.Pools["Shapes"].prefabs["Cube"];
Transform cubeinstance = PoolManager.Pools["Shapes"].Spawn(cubePrefab);
Debug.Log("Spawned: " + cubeinstance.name);