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.IPoolAdapter Interface Reference

Abstraction over the project’s pooling layer so the spawner system isn’t tightly coupled to a specific pool implementation. More...

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

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.
 

Detailed Description

Abstraction over the project’s pooling layer so the spawner system isn’t tightly coupled to a specific pool implementation.

Member Function Documentation

◆ EnsurePool()

void MegaCrush.Spawner.IPoolAdapter.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.

Implemented in MegaCrush.Spawner.PoolAdapter.

◆ Get()

GameObject MegaCrush.Spawner.IPoolAdapter.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.

Implemented in MegaCrush.Spawner.PoolAdapter.

◆ Return()

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

Returns an instance back to the pool.

Parameters
instanceThe instance to return.

Implemented in MegaCrush.Spawner.PoolAdapter.


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