docs.unity.cn
    Show / Hide Table of Contents

    Method SetEnabled

    SetEnabled(Entity, Boolean)

    Enabled entities are processed by systems, disabled entities are not. Adds or removes the Disabled component. By default EntityQuery does not include entities containing the Disabled component.

    If the entity was converted from a prefab and thus has a LinkedEntityGroup component, the entire group will enabled or disabled.

    Declaration
    public void SetEnabled(Entity entity, bool enabled)
    Parameters
    Type Name Description
    Entity entity

    The entity to enable or disable

    Boolean enabled

    True if the entity should be enabled

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Friday, May 28, 2021