docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetRefRWOptional

    GetRefRWOptional(Entity)

    Obsolete. Use TryGetRefRW(Entity, out RefRW<T>) instead. ///

    Declaration
    [Obsolete("This function should not be part of the public API, and will be removed in a future release.")]
    public RefRW<T> GetRefRWOptional(Entity entity)
    Parameters
    Type Name Description
    Entity entity

    The referenced entity

    Returns
    Type Description
    RefRW<T>

    Returns a safe reference to the component data, or an invalid reference if entity does not have component T.

    In This Article
    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)