JUtils
A unity utilities library
JUtils.ObjectPoolManager Class Reference

Makes it easier to work with object pools More...

Inheritance diagram for JUtils.ObjectPoolManager:
Collaboration diagram for JUtils.ObjectPoolManager:

Static Public Member Functions

static PoolItem SpawnPoolItem (PoolItem template, Vector3? position=null, Quaternion? rotation=null, Vector3? localScale=null, Transform parent=null)
 Spawns a pooled item from the prefab More...
 
static ObjectPool GetObjectPool (PoolItem template)
 Get or create an object pool for the given prefab More...
 
static bool DestroyObjectPool (PoolItem template, bool cleanObjects=true)
 Destroys the object pool assigned to the prefab More...
 

Additional Inherited Members

- Protected Member Functions inherited from JUtils.AutoSingletonBehaviour< ObjectPoolManager >
virtual void Awake ()
 
virtual void OnDestroy ()
 
- Properties inherited from JUtils.AutoSingletonBehaviour< ObjectPoolManager >
static T instance [get]
 
static bool exists [get]
 

Detailed Description

Makes it easier to work with object pools

Member Function Documentation

◆ DestroyObjectPool()

static bool JUtils.ObjectPoolManager.DestroyObjectPool ( PoolItem  template,
bool  cleanObjects = true 
)
inlinestatic

Destroys the object pool assigned to the prefab

References JUtils.AutoSingletonBehaviour< ObjectPoolManager >.instance.

◆ GetObjectPool()

static ObjectPool JUtils.ObjectPoolManager.GetObjectPool ( PoolItem  template)
inlinestatic

Get or create an object pool for the given prefab

References JUtils.AutoSingletonBehaviour< ObjectPoolManager >.instance.

Here is the caller graph for this function:

◆ SpawnPoolItem()

static PoolItem JUtils.ObjectPoolManager.SpawnPoolItem ( PoolItem  template,
Vector3?  position = null,
Quaternion?  rotation = null,
Vector3?  localScale = null,
Transform  parent = null 
)
inlinestatic

Spawns a pooled item from the prefab

References JUtils.ObjectPoolManager.GetObjectPool(), and JUtils.ObjectPool.SpawnItem().

Here is the call graph for this function:

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