docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ObjectPool<T>

    Generic object pool.

    Inheritance
    object
    ObjectPool<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    Extension Methods

    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    In This Article
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 06 October 2023