C# Class UnityPooler.GameObjectPool

This class acts as an layer between the user and the PoolableGameObject class.
Mostrar archivo Open project: GalvanicGames/unity-pooler

Public Properties

Property Type Description
verboseLogging bool

Public Methods

Method Description
AddToPool ( this obj, int amount ) : void

Adds to the GameObject's object pool count.

AddToPoolWithObj ( GameObject objToAddTo, int amount ) : void

Adds to the prefab's or GameObject's object pool.

Get ( this obj ) : GameObject

Gets an object from this GameObject's object pool.

GetObj ( GameObject objToCreateFrom ) : GameObject

Receives a GameObject from objToCreateFrom's object pool.

IncrementPool ( this obj ) : void

Increments the GameObject's object pool count.

IncrementPoolWithObj ( GameObject objToInc ) : void

Increments the prefab's or GameObject's object pool.

PopulatePool ( this obj, int amount ) : void

Populates the GameObject's object pool up to the healAmount specified.

PopulatePoolCo ( this obj, int amount ) : IEnumerator

Populates the GameObject's object pool to the specified amount within an enumerator. Intended to work with https://github.com/GalvanicGames/unity-game-loader

PopulatePoolWithObj ( GameObject objToPopulate, int amount ) : void

Populates the prefab's or GameObject's object pool up to the specified count.

Release ( this obj ) : void

Releases the GameObject back to its object pool.

ReleaseObj ( GameObject objToRelease ) : void

Releases an object back to its object pool.

Method Details

AddToPool() public static method

Adds to the GameObject's object pool count.
public static AddToPool ( this obj, int amount ) : void
obj this
amount int Amount to add to the pool.
return void

AddToPoolWithObj() public static method

Adds to the prefab's or GameObject's object pool.
public static AddToPoolWithObj ( GameObject objToAddTo, int amount ) : void
objToAddTo UnityEngine.GameObject The prefab or GameObject to add to.
amount int Amount to add.
return void

Get() public static method

Gets an object from this GameObject's object pool.
public static Get ( this obj ) : GameObject
obj this
return UnityEngine.GameObject

GetObj() public static method

Receives a GameObject from objToCreateFrom's object pool.
public static GetObj ( GameObject objToCreateFrom ) : GameObject
objToCreateFrom UnityEngine.GameObject The prefab or GameObject that we /// want a duplicated object of.
return UnityEngine.GameObject

IncrementPool() public static method

Increments the GameObject's object pool count.
public static IncrementPool ( this obj ) : void
obj this
return void

IncrementPoolWithObj() public static method

Increments the prefab's or GameObject's object pool.
public static IncrementPoolWithObj ( GameObject objToInc ) : void
objToInc UnityEngine.GameObject The prefab or GameObject to increment.
return void

PopulatePool() public static method

Populates the GameObject's object pool up to the healAmount specified.
public static PopulatePool ( this obj, int amount ) : void
obj this
amount int Number to populate with.
return void

PopulatePoolCo() public static method

Populates the GameObject's object pool to the specified amount within an enumerator. Intended to work with https://github.com/GalvanicGames/unity-game-loader
public static PopulatePoolCo ( this obj, int amount ) : IEnumerator
obj this
amount int
return IEnumerator

PopulatePoolWithObj() public static method

Populates the prefab's or GameObject's object pool up to the specified count.
public static PopulatePoolWithObj ( GameObject objToPopulate, int amount ) : void
objToPopulate UnityEngine.GameObject The prefab or GameObject to populate.
amount int Number to populate with.
return void

Release() public static method

Releases the GameObject back to its object pool.
public static Release ( this obj ) : void
obj this
return void

ReleaseObj() public static method

Releases an object back to its object pool.
public static ReleaseObj ( GameObject objToRelease ) : void
objToRelease UnityEngine.GameObject Object to release
return void

Property Details

verboseLogging public_oe static_oe property

public static bool verboseLogging
return bool