docs.unity.cn
    Show / Hide Table of Contents

    Method GetComponentEnabledRefRWOptional

    GetComponentEnabledRefRWOptional<T2>(Entity)

    Gets a safe reference to the component enabled state.

    Declaration
    public EnabledRefRW<T2> GetComponentEnabledRefRWOptional<T2>(Entity entity)
        where T2 : struct, IComponentData, IEnableableComponent
    Parameters
    Type Name Description
    Entity entity

    The referenced entity

    Returns
    Type Description
    EnabledRefRW<T2>

    Returns a safe reference to the component enabled state. If the component doesn't exist, it returns a default ComponentEnabledRefRW.

    Type Parameters
    Name Description
    T2

    The component type

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