Class NativeReferenceUnsafeUtility | Collections | 0.15.0-preview.21
docs.unity.cn
    Show / Hide Table of Contents

    Class NativeReferenceUnsafeUtility

    NativeReference<T> unsafe utilities.

    Inheritance
    Object
    NativeReferenceUnsafeUtility
    Namespace: Unity.Collections.LowLevel.Unsafe
    Syntax
    public static class NativeReferenceUnsafeUtility

    Methods

    GetUnsafePtr<T>(NativeReference<T>)

    Retrieve the data pointer of this container and check for write access.

    Declaration
    public static void *GetUnsafePtr<T>(this NativeReference<T> reference)
        where T : struct
    Parameters
    Type Name Description
    NativeReference<T> reference

    The reference container.

    Returns
    Type Description
    Void*

    The data pointer.

    Type Parameters
    Name Description
    T

    The type of the reference in the container.

    GetUnsafePtrWithoutChecks<T>(NativeReference<T>)

    Retrieve the data pointer of this container without read/write access checks.

    Declaration
    public static void *GetUnsafePtrWithoutChecks<T>(NativeReference<T> reference)
        where T : struct
    Parameters
    Type Name Description
    NativeReference<T> reference

    The reference container.

    Returns
    Type Description
    Void*

    The data pointer.

    Type Parameters
    Name Description
    T

    The type of the reference in the container.

    GetUnsafeReadOnlyPtr<T>(NativeReference<T>)

    Retrieve the data pointer of this container and check for read access.

    Declaration
    public static void *GetUnsafeReadOnlyPtr<T>(this NativeReference<T> reference)
        where T : struct
    Parameters
    Type Name Description
    NativeReference<T> reference

    The reference container.

    Returns
    Type Description
    Void*

    The data pointer.

    Type Parameters
    Name Description
    T

    The type of the reference in the container.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Saturday, January 23, 2021