docs.unity.cn
    Show / Hide Table of Contents

    Struct UnsafePtrList<T>.ParallelReader

    A parallel reader for an UnsafePtrList<T>.

    Namespace: Unity.Collections.LowLevel.Unsafe
    Syntax
    public struct ParallelReader
    Remarks

    Use AsParallelReader() to create a parallel reader for a list.

    Fields

    Length

    The number of elements.

    Declaration
    public readonly int Length
    Field Value
    Type Description
    Int32

    Ptr

    The internal buffer of the list.

    Declaration
    [NativeDisableUnsafePtrRestriction]
    public readonly T**Ptr
    Field Value
    Type Description
    T**

    Methods

    Contains(Void*)

    Returns true if the list contains at least one occurrence of a specific pointer.

    Declaration
    public bool Contains(void *ptr)
    Parameters
    Type Name Description
    Void* ptr

    The pointer to search for in the list.

    Returns
    Type Description
    Boolean

    True if the list contains at least one occurrence of the pointer.

    IndexOf(Void*)

    Returns the index of the first occurrence of a specific pointer in the list.

    Declaration
    public int IndexOf(void *ptr)
    Parameters
    Type Name Description
    Void* ptr

    The pointer to search for in the list.

    Returns
    Type Description
    Int32

    The index of the first occurrence of the pointer. Returns -1 if it is not found in the list.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Wednesday, August 3, 2022
    Terms of use