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.
Loading...
Searching...
No Matches
MegaCrush.Spawner.PoolAdapter Class Referencesealed

Default adapter that forwards calls to PoolManager from MegaCrush.ObjectPool. More...

Inheritance diagram for MegaCrush.Spawner.PoolAdapter:
MegaCrush.Spawner.IPoolAdapter

Public Member Functions

GameObject Get (GameObject prefab)
 Retrieves (or instantiates) an instance of prefab from the pool.
Parameters
prefabThe prefab to get an instance of.
Returns
An active pooled GameObject instance.

 
void Return (GameObject instance)
 Returns an instance back to the pool.
Parameters
instanceThe instance to return.

 
void EnsurePool (GameObject prefab, int count)
 Ensures a pool exists for prefab with at least count prewarmed instances.
Parameters
prefabPrefab to pool.
countNumber of instances to precreate.

 

Detailed Description

Default adapter that forwards calls to PoolManager from MegaCrush.ObjectPool.

Member Function Documentation

◆ EnsurePool()

void MegaCrush.Spawner.PoolAdapter.EnsurePool ( GameObject prefab,
int count )

Ensures a pool exists for prefab with at least count prewarmed instances.

Parameters
prefabPrefab to pool.
countNumber of instances to precreate.

Implements MegaCrush.Spawner.IPoolAdapter.

◆ Get()

GameObject MegaCrush.Spawner.PoolAdapter.Get ( GameObject prefab)

Retrieves (or instantiates) an instance of prefab from the pool.

Parameters
prefabThe prefab to get an instance of.
Returns
An active pooled GameObject instance.

Implements MegaCrush.Spawner.IPoolAdapter.

◆ Return()

void MegaCrush.Spawner.PoolAdapter.Return ( GameObject instance)

Returns an instance back to the pool.

Parameters
instanceThe instance to return.

Implements MegaCrush.Spawner.IPoolAdapter.


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