Code Reference

This section will guide your through the public classes and members in PoolManager available for use in your scripts. Please be sure to start in the Quick Start Guide before using the code reference.

Please feel free to read through this documentation to become familiar with what is offered. For quick look-up, it is often easier to use this sites search functionality. When in this documentation section, the search box will only search the documentation.

When using PoolManager, add the namespace to the top of the script file: 'using PathologicalGames;'

This following is provided as a summary of the content in this section. Follow the links here or to the left in the site's navigation sidebar.

If you have any questions, comments or find typos or errors, please visit our forums and let us know!

Optional Events

OnSpawned  Runs each time an instance is spawned.
OnDespawned Runs each time an instance is despawned.

PoolManager Class Members

 Pools Pools is the primary means for accessing PoolManager's instance ("spawn") pools. 

SpawnPool Class Members

 CreatePrefabPool Creates a new PrefabPool in a SpawnPool to allow prefab-specific options such as instance 
pre-loading.
 Despawn If the passed transform is managed by the SpawnPool, it will be deactivated and made available to be respawned.
 GetPrefab Returns the prefab used to create the passed instance. This is provided for convenience as Unity doesn't offer this feature.
 group The SpawnPool's 'Group' is the GameObject which has the SpawnPool component and is the default parent of all instances in the pool.
 logMessage Static access to the debug message logging state.
 Spawn Use Spawn() instead of Unity's Instantiate().


PrefabPool Class Members
This class is not accessable directly. See these links for more information
    See 'Per-Prefab Options' for information about each of the settings/options available.
    See SpawnPool.CreatePrefabPool() for usage information