Click or drag to resize

GameObjectPoolT Class

An object pool that can recycle prefab instances.
Inheritance Hierarchy
SystemObject
  Archon.SwissArmyLib.PoolingPoolT
    Archon.SwissArmyLib.PoolingGameObjectPoolT

Namespace:  Archon.SwissArmyLib.Pooling
Assembly:  Archon.SwissArmyLib (in Archon.SwissArmyLib.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class GameObjectPool<T> : Pool<T>, 
	IDisposable
where T : Object
Request Example View Source

Type Parameters

T
The type of the component on the prefab.

The GameObjectPoolT type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyFreeCount
Gets the current amount of free instances in the pool.
(Inherited from PoolT.)
Public propertyPrefab
Gets the prefab used to instantiate GameObjects.
Top
Methods
  NameDescription
Public methodCancelDespawn
Cancels a pending timed despawn.
(Inherited from PoolT.)
Public methodDespawn(T)
Despawns an object, adding it back to the pool.
(Overrides PoolTDespawn(T).)
Public methodDespawn(T, Single, Boolean)
Despawns an object after a delay.
(Inherited from PoolT.)
Public methodDispose
Destroys the pool and any despawned objects in it.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Destructor.
(Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnDespawned
Called when an object has been despawned and placed back in the pool.
(Inherited from PoolT.)
Protected methodOnSpawned
Called when an object has been spawned and removed from the pool.
(Overrides PoolTOnSpawned(T).)
Public methodPrewarm
Fills the pool with objects so that it contains the specified amount of objects. If it already contains the specified amount or more, nothing will be done.
(Inherited from PoolT.)
Public methodSpawn
Spawns a recycled object if there's one available, otherwise creates a new instance.
(Inherited from PoolT.)
Public methodSpawn(Transform)
Spawns a recycled object if there's one available, otherwise creates a new instance.
Public methodSpawn(Vector3)
Spawns a recycled object if there's one available, otherwise creates a new instance.
Public methodSpawn(Vector3, Quaternion)
Spawns a recycled object if there's one available, otherwise creates a new instance.
Public methodSpawn(Vector3, Quaternion, Transform)
Spawns a recycled object if there's one available, otherwise creates a new instance.
Protected methodSpawnInternal
Recycles or creates a object if there's one available without calling OnSpawned(T).
(Overrides PoolTSpawnInternal.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
See Also