C# Class UnityPooler.GameObjectPool

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

Méthodes publiques

Свойство Type Description
verboseLogging bool

Méthodes publiques

Méthode 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 méthode

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.
Résultat void

AddToPoolWithObj() public static méthode

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.
Résultat void

Get() public static méthode

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

GetObj() public static méthode

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.
Résultat UnityEngine.GameObject

IncrementPool() public static méthode

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

IncrementPoolWithObj() public static méthode

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

PopulatePool() public static méthode

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.
Résultat void

PopulatePoolCo() public static méthode

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
Résultat IEnumerator

PopulatePoolWithObj() public static méthode

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.
Résultat void

Release() public static méthode

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

ReleaseObj() public static méthode

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

Property Details

verboseLogging public_oe static_oe property

public static bool verboseLogging
Résultat bool