docs.unity.cn
    Show / Hide Table of Contents

    Method SetBufferEnabled

    SetBufferEnabled(Entity, Boolean)

    Enable or disable the IBufferElementData of type T on the specified Entity. This operation does not cause a structural change (even if it occurs on a worker thread), or affect the value of the component. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component. The type T must implement the IEnableableComponent interface.

    Declaration
    public void SetBufferEnabled(Entity entity, bool value)
    Parameters
    Type Name Description
    Entity entity

    The entity whose component should be enabled or disabled.

    Boolean value

    True if the specified component should be enabled, or false if it should be disabled.

    Exceptions
    Type Condition
    ArgumentException

    The Entity does not exist.

    See Also
    IsBufferEnabled(Entity)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023