Class ObjectPool<T>
Generic object pool.
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public class ObjectPool<T> where T : new()
Type Parameters
Name | Description |
---|---|
T | Type of the object pool. |
Constructors
Name | Description |
---|---|
ObjectPool(UnityAction<T>, UnityAction<T>, bool) | Constructor. |
Properties
Name | Description |
---|---|
countActive | Number of active objects in the pool. |
countAll | Number of objects in the pool. |
countInactive | Number of inactive objects in the pool. |
Methods
Name | Description |
---|---|
Get() | Get an object from the pool. |
Get(out T) | Get et new PooledObject. |
Release(T) | Release an object to the pool. |