Class NativeReferenceUnsafeUtility | Collections | 0.11.0-preview.17
docs.unity3d.com
    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.

    In This Article
    • Methods
      • GetUnsafePtr<T>(NativeReference<T>)
      • GetUnsafePtrWithoutChecks<T>(NativeReference<T>)
      • GetUnsafeReadOnlyPtr<T>(NativeReference<T>)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023