docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NativeReferenceUnsafeUtility

    Provides extension methods for NativeReference.

    Inheritance
    object
    NativeReferenceUnsafeUtility
    Namespace: Unity.Collections.LowLevel.Unsafe
    Assembly: Unity.Collections.dll
    Syntax
    public static class NativeReferenceUnsafeUtility

    Methods

    GetUnsafePtrWithoutChecks<T>(NativeReference<T>)

    Returns a pointer to this reference's stored value.

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

    The reference.

    Returns
    Type Description
    T*

    A pointer to this reference's stored value.

    Type Parameters
    Name Description
    T

    The type of the value.

    Remarks

    Performs no job safety checks.

    GetUnsafePtr<T>(NativeReference<T>)

    Returns a pointer to this reference's stored value.

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

    The reference.

    Returns
    Type Description
    T*

    A pointer to this reference's stored value.

    Type Parameters
    Name Description
    T

    The type of the value.

    Remarks

    Performs a job safety check for read-write access.

    GetUnsafeReadOnlyPtr<T>(NativeReference<T>)

    Returns a pointer to this reference's stored value.

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

    The reference.

    Returns
    Type Description
    T*

    A pointer to this reference's stored value.

    Type Parameters
    Name Description
    T

    The type of the value.

    Remarks

    Performs a job safety check for read-only access.

    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)