docs.unity3d.com

Collections 2.4.1

Search Results for

    Show / Hide Table of Contents

    Class NativeBitArrayUnsafeUtility

    Unsafe helper methods for NativeBitArray.

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

    Methods

    ConvertExistingDataToNativeBitArray(void*, int, AllocatorHandle)

    Returns a bit array with content aliasing a buffer.

    Declaration
    public static NativeBitArray ConvertExistingDataToNativeBitArray(void* ptr, int sizeInBytes, AllocatorManager.AllocatorHandle allocator)
    Parameters
    Type Name Description
    void* ptr

    A buffer.

    int sizeInBytes

    Size of the buffer in bytes. Must be a multiple of 8.

    AllocatorManager.AllocatorHandle allocator

    The allocator that was used to create the buffer.

    Returns
    Type Description
    NativeBitArray

    A bit array with content aliasing a buffer.

    GetAtomicSafetyHandle(in NativeBitArray)

    Returns an array's atomic safety handle.

    Declaration
    public static AtomicSafetyHandle GetAtomicSafetyHandle(in NativeBitArray container)
    Parameters
    Type Name Description
    NativeBitArray container

    Array from which to get an AtomicSafetyHandle.

    Returns
    Type Description
    AtomicSafetyHandle

    This array's atomic safety handle.

    SetAtomicSafetyHandle(ref NativeBitArray, AtomicSafetyHandle)

    Sets an array's atomic safety handle.

    Declaration
    public static void SetAtomicSafetyHandle(ref NativeBitArray container, AtomicSafetyHandle safety)
    Parameters
    Type Name Description
    NativeBitArray container

    Array which the AtomicSafetyHandle is for.

    AtomicSafetyHandle safety

    Atomic safety handle for this array.

    In This Article
    • Methods
      • ConvertExistingDataToNativeBitArray(void*, int, AllocatorHandle)
      • GetAtomicSafetyHandle(in NativeBitArray)
      • SetAtomicSafetyHandle(ref NativeBitArray, AtomicSafetyHandle)
    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)