Simple pooling system for GameObjects.
More...
|
| static void | AddNewObjectPool (PoolObjectSetting thisObject) |
| | Register a new pool and pre-instantiate its objects.
|
| |
| static GameObject | GetInstance (GameObject prefab) |
| | Get an instance by prefab reference. Expands if exhausted.
|
| |
| static GameObject | GetInstance (string name) |
| | Get an instance by pool name (prefab name).
|
| |
| static void | ReturnInstance (GameObject instance) |
| | Return an instance to the pool.
|
| |
| static string | GetObjectName (GameObject prefab) |
| | Cached prefab name (avoids GC).
|
| |
|
| static bool | IsWarming [get] |
| | True while the pool is instantiating (warmup/expansion). Helpful as a guard if any legacy logic still runs in OnEnable.
|
| |
Simple pooling system for GameObjects.
◆ AddNewObjectPool()
| static void MegaCrush.ObjectPool.PoolManager.AddNewObjectPool |
( |
PoolObjectSetting | thisObject | ) |
|
|
static |
Register a new pool and pre-instantiate its objects.
◆ GetInstance() [1/2]
| static GameObject MegaCrush.ObjectPool.PoolManager.GetInstance |
( |
GameObject | prefab | ) |
|
|
static |
Get an instance by prefab reference. Expands if exhausted.
◆ GetInstance() [2/2]
| static GameObject MegaCrush.ObjectPool.PoolManager.GetInstance |
( |
string | name | ) |
|
|
static |
Get an instance by pool name (prefab name).
◆ GetObjectName()
| static string MegaCrush.ObjectPool.PoolManager.GetObjectName |
( |
GameObject | prefab | ) |
|
|
static |
Cached prefab name (avoids GC).
◆ ReturnInstance()
| static void MegaCrush.ObjectPool.PoolManager.ReturnInstance |
( |
GameObject | instance | ) |
|
|
static |
Return an instance to the pool.
In addition to disabling the instance, any UnityEngine.AI.NavMeshAgent on the instance is explicitly disabled to ensure safe re-checkout and placement by runtime systems.
◆ IsWarming
| bool MegaCrush.ObjectPool.PoolManager.IsWarming |
|
staticget |
True while the pool is instantiating (warmup/expansion). Helpful as a guard if any legacy logic still runs in OnEnable.
The documentation for this class was generated from the following file:
- D:/projects/Asset Store Packages/com.pixelwizards.objectpool/Code/Runtime/PoolManager.cs