Class NativeArrayUnsafeUtility | DOTS Runtime | 0.28.0-preview.40
docs.unity3d.com
    Show / Hide Table of Contents

    Class NativeArrayUnsafeUtility

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

    Methods

    ConvertExistingDataToNativeArray<T>(Void*, Int32, Allocator)

    Declaration
    public static NativeArray<T> ConvertExistingDataToNativeArray<T>(void *dataPointer, int length, Allocator allocator)
        where T : struct
    Parameters
    Type Name Description
    Void* dataPointer
    Int32 length
    Allocator allocator
    Returns
    Type Description
    NativeArray<T>
    Type Parameters
    Name Description
    T

    GetUnsafeBufferPointerWithoutChecks<T>(NativeArray<T>)

    Declaration
    public static void *GetUnsafeBufferPointerWithoutChecks<T>(NativeArray<T> nativeArray)
        where T : struct
    Parameters
    Type Name Description
    NativeArray<T> nativeArray
    Returns
    Type Description
    Void*
    Type Parameters
    Name Description
    T

    GetUnsafePtr<T>(NativeArray<T>)

    Declaration
    public static void *GetUnsafePtr<T>(this NativeArray<T> nativeArray)
        where T : struct
    Parameters
    Type Name Description
    NativeArray<T> nativeArray
    Returns
    Type Description
    Void*
    Type Parameters
    Name Description
    T

    GetUnsafeReadOnlyPtr<T>(NativeArray<T>)

    Declaration
    public static void *GetUnsafeReadOnlyPtr<T>(this NativeArray<T> nativeArray)
        where T : struct
    Parameters
    Type Name Description
    NativeArray<T> nativeArray
    Returns
    Type Description
    Void*
    Type Parameters
    Name Description
    T
    In This Article
    • Methods
      • ConvertExistingDataToNativeArray<T>(Void*, Int32, Allocator)
      • GetUnsafeBufferPointerWithoutChecks<T>(NativeArray<T>)
      • GetUnsafePtr<T>(NativeArray<T>)
      • GetUnsafeReadOnlyPtr<T>(NativeArray<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