![]() |
Runtime Spawner 1.2.5
Generic Runtime spawn and instance pooling system for spawning random AI agents around a map. Works with ANY AI system easily.
|
Default adapter that forwards calls to PoolManager from MegaCrush.ObjectPool
.
More...
Public Member Functions | |||||
GameObject | Get (GameObject prefab) | ||||
Retrieves (or instantiates) an instance of prefab from the pool.
| |||||
void | Return (GameObject instance) | ||||
Returns an instance back to the pool.
| |||||
void | EnsurePool (GameObject prefab, int count) | ||||
Ensures a pool exists for prefab with at least count prewarmed instances.
| |||||
Default adapter that forwards calls to PoolManager from MegaCrush.ObjectPool
.
void MegaCrush.Spawner.PoolAdapter.EnsurePool | ( | GameObject | prefab, |
int | count ) |
Ensures a pool exists for prefab with at least count prewarmed instances.
prefab | Prefab to pool. |
count | Number of instances to precreate. |
Implements MegaCrush.Spawner.IPoolAdapter.
GameObject MegaCrush.Spawner.PoolAdapter.Get | ( | GameObject | prefab | ) |
Retrieves (or instantiates) an instance of prefab from the pool.
prefab | The prefab to get an instance of. |
Implements MegaCrush.Spawner.IPoolAdapter.
void MegaCrush.Spawner.PoolAdapter.Return | ( | GameObject | instance | ) |
Returns an instance back to the pool.
instance | The instance to return. |
Implements MegaCrush.Spawner.IPoolAdapter.