docs.unity.cn
    Show / Hide Table of Contents

    Method Optional

    Optional(NativeArray<T>, Int32)

    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.

    Int32 index

    The index of the array.

    Returns
    Type Description
    RefRW<T>

    Read-write optional reference to component

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