docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetComponentEnabledRefRWOptional

    GetComponentEnabledRefRWOptional<T2>(Entity)

    Obsolete. Use GetEnabledRefRWOptional<T2>(Entity) instead.

    Declaration
    [Obsolete("This method has been renamed to GetEnabledRefRWOptional<T>. (RemovedAfter Entities 1.0)", false)]
    public EnabledRefRW<T2> GetComponentEnabledRefRWOptional<T2>(Entity entity) where T2 : unmanaged, 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 EnabledRefRW<T>.

    Type Parameters
    Name Description
    T2

    The component type

    In This Article
    • GetComponentEnabledRefRWOptional<T2>(Entity)
    Back to top
    Copyright © 2025 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)