Click or drag to resize

PoolHelperT Class

Simple static helper class for pooling non-Unity objects. If the pooled objects implement IPoolable they will be notified when they're spawned and despawned. For Unity GameObjects see PoolHelper.
Inheritance Hierarchy
SystemObject
  Archon.SwissArmyLib.PoolingPoolHelperT

Namespace:  Archon.SwissArmyLib.Pooling
Assembly:  Archon.SwissArmyLib (in Archon.SwissArmyLib.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public static class PoolHelper<T>
where T : class, new()
Request Example View Source

Type Parameters

T
The type of the object to pool.

The PoolHelperT type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberFreeCount
Gets the amount of free instances in the pool.
Top
Methods
  NameDescription
Public methodStatic memberDespawn(T)
Despawns an instance of the type T and marks it for reuse.
Public methodStatic memberDespawn(T, Single, Boolean)
Despawns an object after a delay.
Public methodStatic memberSpawn
Spawns a recycled or new instance of the type T.
Top
See Also