Example Patterns‎ > ‎

Spawn By Prefab Name

This is more of a re-direct to make it obvious this functionality exists.

Once you have a prefab associated with a SpawnPool, you can use the very fast prefabs dictionary to get a reference to a prefab by name. Prefabs are associated through the creation of a PrefabPool. This is done automatically if you drag and drop a prefab in to the inspector, or you can use Spawn() at least once, or even create your own PrefabPool directly through code.

It is usually better to use the standard drag&drop class variable to get a reference for Spawn(), but in some situations, this can be very handy.