docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetComponentEnabledRefROOptional

    GetComponentEnabledRefROOptional<T2>(Entity)

    Gets a safe reference to the component enabled state.

    Declaration
    public EnabledRefRO<T2> GetComponentEnabledRefROOptional<T2>(Entity entity) where T2 : unmanaged, IComponentData, IEnableableComponent
    Parameters
    Type Name Description
    Entity entity

    The referenced entity

    Returns
    Type Description
    EnabledRefRO<T2>

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

    Type Parameters
    Name Description
    T2

    The component 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)