Feel  4.0.1
The best way to improve your game's feel and make it extra juicy
MoreMountains.Feedbacks.MMMiniObjectPooler Class Reference
Inheritance diagram for MoreMountains.Feedbacks.MMMiniObjectPooler:

Public Member Functions

virtual MMMiniObjectPool ExistingPool (string poolName)
 Looks for an existing pooler for the same object, returns it if found, returns null otherwise More...
 
virtual void FillObjectPool ()
 Implement this method to fill the pool with objects More...
 
virtual GameObject GetPooledGameObject ()
 Implement this method to return a gameobject More...
 
virtual void DestroyObjectPool ()
 Destroys the object pool More...
 

Static Public Member Functions

static void AddPool (MMMiniObjectPool pool)
 Adds a pooler to the static list if needed More...
 
static void RemovePool (MMMiniObjectPool pool)
 Removes a pooler from the static list More...
 
static string DetermineObjectPoolName (GameObject gameObjectToPool)
 Determines the name of the object pool. More...
 

Public Attributes

GameObject GameObjectToPool
 the game object we'll instantiate More...
 
int PoolSize = 20
 the number of objects we'll add to the pool More...
 
bool PoolCanExpand = true
 if true, the pool will automatically add objects to the itself if needed More...
 
bool MutualizeWaitingPools = false
 if this is true, the pool will try not to create a new waiting pool if it finds one with the same name. More...
 
bool NestWaitingPool = true
 if this is true, all waiting and active objects will be regrouped under an empty game object. Otherwise they'll just be at top level in the hierarchy More...
 

Protected Member Functions

virtual void Awake ()
 On awake we fill our object pool More...
 
virtual void CreateWaitingPool ()
 Creates the waiting pool or tries to reuse one if there's already one available More...
 
virtual GameObject AddOneObjectToThePool ()
 Adds one object of the specified type (in the inspector) to the pool. More...
 

Protected Attributes

GameObject _waitingPool = null
 this object is just used to group the pooled objects More...
 
MMMiniObjectPool _objectPool
 

Static Protected Attributes

const int _initialPoolsListCapacity = 5
 

Member Function Documentation

◆ AddOneObjectToThePool()

virtual GameObject MoreMountains.Feedbacks.MMMiniObjectPooler.AddOneObjectToThePool ( )
protectedvirtual

Adds one object of the specified type (in the inspector) to the pool.

Returns
The one object to the pool.

◆ AddPool()

static void MoreMountains.Feedbacks.MMMiniObjectPooler.AddPool ( MMMiniObjectPool  pool)
static

Adds a pooler to the static list if needed

Parameters
pool

◆ Awake()

virtual void MoreMountains.Feedbacks.MMMiniObjectPooler.Awake ( )
protectedvirtual

On awake we fill our object pool

◆ CreateWaitingPool()

virtual void MoreMountains.Feedbacks.MMMiniObjectPooler.CreateWaitingPool ( )
protectedvirtual

Creates the waiting pool or tries to reuse one if there's already one available

◆ DestroyObjectPool()

virtual void MoreMountains.Feedbacks.MMMiniObjectPooler.DestroyObjectPool ( )
virtual

Destroys the object pool

◆ DetermineObjectPoolName()

static string MoreMountains.Feedbacks.MMMiniObjectPooler.DetermineObjectPoolName ( GameObject  gameObjectToPool)
static

Determines the name of the object pool.

Returns
The object pool name.

◆ ExistingPool()

virtual MMMiniObjectPool MoreMountains.Feedbacks.MMMiniObjectPooler.ExistingPool ( string  poolName)
virtual

Looks for an existing pooler for the same object, returns it if found, returns null otherwise

Parameters
objectToPool
Returns

◆ FillObjectPool()

virtual void MoreMountains.Feedbacks.MMMiniObjectPooler.FillObjectPool ( )
virtual

Implement this method to fill the pool with objects

◆ GetPooledGameObject()

virtual GameObject MoreMountains.Feedbacks.MMMiniObjectPooler.GetPooledGameObject ( )
virtual

Implement this method to return a gameobject

Returns
The pooled game object.

◆ RemovePool()

static void MoreMountains.Feedbacks.MMMiniObjectPooler.RemovePool ( MMMiniObjectPool  pool)
static

Removes a pooler from the static list

Parameters
pool

Member Data Documentation

◆ _initialPoolsListCapacity

const int MoreMountains.Feedbacks.MMMiniObjectPooler._initialPoolsListCapacity = 5
staticprotected

◆ _objectPool

MMMiniObjectPool MoreMountains.Feedbacks.MMMiniObjectPooler._objectPool
protected

◆ _waitingPool

GameObject MoreMountains.Feedbacks.MMMiniObjectPooler._waitingPool = null
protected

this object is just used to group the pooled objects

◆ GameObjectToPool

GameObject MoreMountains.Feedbacks.MMMiniObjectPooler.GameObjectToPool

the game object we'll instantiate

◆ MutualizeWaitingPools

bool MoreMountains.Feedbacks.MMMiniObjectPooler.MutualizeWaitingPools = false

if this is true, the pool will try not to create a new waiting pool if it finds one with the same name.

◆ NestWaitingPool

bool MoreMountains.Feedbacks.MMMiniObjectPooler.NestWaitingPool = true

if this is true, all waiting and active objects will be regrouped under an empty game object. Otherwise they'll just be at top level in the hierarchy

◆ PoolCanExpand

bool MoreMountains.Feedbacks.MMMiniObjectPooler.PoolCanExpand = true

if true, the pool will automatically add objects to the itself if needed

◆ PoolSize

int MoreMountains.Feedbacks.MMMiniObjectPooler.PoolSize = 20

the number of objects we'll add to the pool


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