docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetBuffer

    GetBuffer<T>(Entity)

    Gets the dynamic buffer of an entity.

    Declaration
    public static DynamicBuffer<T> GetBuffer<T>(Entity entity) where T : unmanaged, IBufferElementData
    Parameters
    Type Name Description
    Entity entity

    The entity.

    Returns
    Type Description
    DynamicBuffer<T>

    The DynamicBuffer object for accessing the buffer contents.

    Type Parameters
    Name Description
    T

    The type of the buffer's elements.

    Remarks

    This method gets replaced with component access methods through a cached BufferLookup<T>.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if T is an unsupported type.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)