docs.unity.cn
    Show / Hide Table of Contents

    Method HasBuffer

    HasBuffer<T>(Entity)

    Checks whether an entity has a dynamic buffer of a specific IBufferElementData type.

    Declaration
    [GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[]{typeof(BurstCompatibleBufferElement)})]
    public bool HasBuffer<T>(Entity entity)
        where T : struct, IBufferElementData
    Parameters
    Type Name Description
    Entity entity

    The Entity object.

    Returns
    Type Description
    Boolean

    True, if the specified entity has a dynamic buffer of IBufferElementData type.

    Type Parameters
    Name Description
    T

    The IBufferElementData type.

    Remarks

    Always returns false for an entity that has been destroyed.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023