Pro Pooling
ProPooling.GlobalPools Class Reference

Component for handling global pools. You can also manage your own pools directly if you so wish by adding your own List<Pool> property to your component. More...

Inheritance diagram for ProPooling.GlobalPools:
ProPooling.PoolsBase

Protected Member Functions

void Awake ()
 

Properties

static GlobalPools Instance [get]
 
static bool IsActive [get]
 
bool MarkAsDontDestroyOnload [get, set]
 Mark as DontDestroyOnload More...
 
- Properties inherited from ProPooling.PoolsBase
bool AutomaticallyAddRuntimePools [get, set]
 Whether to automatically add pools for requested items that do not exist. More...
 
Pool DefaultPoolSettings [get, set]
 Default settings for new Pools and Pools that are automatically created. More...
 
List< PoolPools [get, set]
 A list of pools that should be preallocated. More...
 
bool IsInitialised [get, set]
 Whether the poolmanager has been initialised. More...
 

Additional Inherited Members

- Public Member Functions inherited from ProPooling.PoolsBase
 PoolsBase ()
 Constructor needed for unit testing. More...
 
void InitialisePools ()
 Initialise all pools - called by singleton in Awake More...
 
Pool GetPool (GameObject prefab)
 Get a pool for the given prefab, optionally creating it if needed based upon the global settings More...
 
Pool GetPool (GameObject prefab, bool autoCreate)
 Get a pool for the given prefab, optionally creating it if needed More...
 
Pool GetPool (string name)
 Get a pool for the prefab with the specified name More...
 
bool ContainsPool (string name)
 Whether the named pool already exists More...
 
bool ContainsPool (GameObject prefab)
 Whether a pool for the specified GameObject already exists More...
 
Pool CreatePool (GameObject prefab, Transform inactiveParent=null)
 Create a pool for the given prefab with default parameters. If an existing pool is found for this prefab then that is returned instead. More...
 
Pool CreatePool (GameObject prefab, int initialSize, Pool.SizeExceededModeType limitExceededMode, bool hasMaximumSize, int maximumSize, bool createIfMaximumExceeded, Transform inactiveParent=null)
 Create a pool for the given prefab with the specified parameters. If an existing pool is found for this prefab then that is returned instead. More...
 
Pool AddPool (Pool pool)
 Add a pool to management. More...
 
void RemovePool (Pool pool)
 Remove the specified pool from management. More...
 
void ClearAndRemovePool (Pool pool)
 Clear the pool and remove it from management. Note that if there are still spawned items then these will not be destroyed by this call. More...
 
GameObject Spawn (string poolName, Transform parent=null)
 Spawn a gameobject from the named pool. More...
 
GameObject Spawn (string poolName, Vector3 position, Quaternion rotation, Transform parent=null)
 Spawn a gameobject from the named pool. More...
 
PoolItem SpawnPoolItem (string poolName, Transform parent=null)
 Spawn a PoolItem reference from the named pool More...
 
PoolItem SpawnPoolItem (string poolName, Vector3 position, Quaternion rotation, Transform parent=null)
 Spawn a PoolItem reference from the named pool More...
 
GameObject Spawn (GameObject gameObject, Transform parent=null)
 Spawn a gameobject from the pool of the specified type. More...
 
GameObject Spawn (GameObject gameObject, Vector3 position, Quaternion rotation, Transform parent=null)
 Spawn a gameobject from the pool of the spefified type. More...
 
PoolItem SpawnPoolItem (GameObject gameObject, Transform parent=null)
 Spawn a PoolItem reference from the pool of the spefified type. More...
 
PoolItem SpawnPoolItem (Pool pool, GameObject gameObject, Transform parent=null)
 Spawn a PoolItem reference from the pool of the spefified type. More...
 
PoolItem SpawnPoolItem (GameObject gameObject, Vector3 position, Quaternion rotation, Transform parent=null)
 Spawn a PoolItem reference from the pool of the spefified type. More...
 
PoolItem SpawnPoolItem (Pool pool, GameObject gameObject, Vector3 position, Quaternion rotation, Transform parent=null)
 Spawn a PoolItem reference from the pool of the specified type. More...
 
bool Despawn (PoolItem poolItem)
 Despawn an item back to a pool managed by GlobalPools. More...
 
bool Despawn (GameObject gameObject)
 Despawn an item back to a pool managed by GlobalPools. More...
 
- Public Attributes inherited from ProPooling.PoolsBase
const string MessageAssertIsActive = "Pro Pooling: Global Pools is not active. Please check it is added to you scene and if needed increate it's script execution order priority."
 

Detailed Description

Component for handling global pools. You can also manage your own pools directly if you so wish by adding your own List<Pool> property to your component.

Member Function Documentation

◆ Awake()

void ProPooling.GlobalPools.Awake ( )
protected

Property Documentation

◆ Instance

GlobalPools ProPooling.GlobalPools.Instance
staticget

◆ IsActive

bool ProPooling.GlobalPools.IsActive
staticget

◆ MarkAsDontDestroyOnload

bool ProPooling.GlobalPools.MarkAsDontDestroyOnload
getset

Mark as DontDestroyOnload


The documentation for this class was generated from the following file: