MMFeedbacks  v1.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Feedbacks.MMMiniObjectPooler Class Reference
Inheritance diagram for MoreMountains.Feedbacks.MMMiniObjectPooler:

Public Member Functions

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...
 

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 string DetermineObjectPoolName ()
 Determines the name of the object pool. 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
 
List< GameObject > _pooledGameObjects
 

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.

◆ 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()

virtual string MoreMountains.Feedbacks.MMMiniObjectPooler.DetermineObjectPoolName ( )
protectedvirtual

Determines the name of the object pool.

Returns
The object pool name.

◆ 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.

Member Data Documentation

◆ _objectPool

MMMiniObjectPool MoreMountains.Feedbacks.MMMiniObjectPooler._objectPool
protected

◆ _pooledGameObjects

List<GameObject> MoreMountains.Feedbacks.MMMiniObjectPooler._pooledGameObjects
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: