docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Optional

    Optional(NativeArray<T>, int)

    Stores a safe reference to a component from an array of components at the index. If the array is empty stores a null reference.

    Declaration
    public static RefRW<T> Optional(NativeArray<T> componentDataNativeArray, int index)
    Parameters
    Type Name Description
    NativeArray<T> componentDataNativeArray

    The array of components.

    int index

    The index of the array.

    Returns
    Type Description
    RefRW<T>

    Read-write optional reference to component

    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)