Struct ElementPool<T> | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct ElementPool<T>

    Namespace: Unity.Collections
    Syntax
    public struct ElementPool<T> : IDisposable where T : struct, IPoolElement
    Type Parameters
    Name Description
    T

    Constructors

    ElementPool(Int32, Allocator)

    Declaration
    public ElementPool(int capacity, Allocator allocator)
    Parameters
    Type Name Description
    System.Int32 capacity
    Allocator allocator

    ElementPool(Void*, Int32)

    Declaration
    public ElementPool(void *userBuffer, int capacity)
    Parameters
    Type Name Description
    System.Void* userBuffer
    System.Int32 capacity

    Properties

    Capacity

    Declaration
    public int Capacity { get; }
    Property Value
    Type Description
    System.Int32

    Elements

    Declaration
    public ElementPool<T>.ElementEnumerable Elements { get; }
    Property Value
    Type Description
    ElementPool.ElementEnumerable<>

    Indices

    Declaration
    public ElementPool<T>.IndexEnumerable Indices { get; }
    Property Value
    Type Description
    ElementPool.IndexEnumerable<>

    Item[Int32]

    Declaration
    public T this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    T

    PeakCount

    Declaration
    public int PeakCount { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    Allocate(T)

    Declaration
    public int Allocate(T element)
    Parameters
    Type Name Description
    T element
    Returns
    Type Description
    System.Int32

    Clear()

    Declaration
    public void Clear()

    CopyFrom(Void*, Int32)

    Declaration
    public void CopyFrom(void *buffer, int length)
    Parameters
    Type Name Description
    System.Void* buffer
    System.Int32 length

    CopyFrom(ElementPool<T>)

    Declaration
    public void CopyFrom(ElementPool<T> other)
    Parameters
    Type Name Description
    ElementPool<T> other

    Dispose()

    Declaration
    public void Dispose()

    GetFirstIndex()

    Declaration
    public int GetFirstIndex()
    Returns
    Type Description
    System.Int32

    GetNextIndex(Int32)

    Declaration
    public int GetNextIndex(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Int32

    Release(Int32)

    Declaration
    public void Release(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023