![]() |
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.
|
Abstraction over the project’s pooling layer so the spawner system isn’t tightly coupled to a specific pool implementation. 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. | |
Abstraction over the project’s pooling layer so the spawner system isn’t tightly coupled to a specific pool implementation.
void MegaCrush.Spawner.IPoolAdapter.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. |
Implemented in MegaCrush.Spawner.PoolAdapter.
GameObject MegaCrush.Spawner.IPoolAdapter.Get | ( | GameObject | prefab | ) |
Retrieves (or instantiates) an instance of prefab from the pool.
prefab | The prefab to get an instance of. |
Implemented in MegaCrush.Spawner.PoolAdapter.
void MegaCrush.Spawner.IPoolAdapter.Return | ( | GameObject | instance | ) |
Returns an instance back to the pool.
instance | The instance to return. |
Implemented in MegaCrush.Spawner.PoolAdapter.