{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class CollectionHelper | Collections | 2.3.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CollectionHelper

    Provides helper methods for collections.

    Inheritance
    object
    CollectionHelper
    Namespace: Unity.Collections
    Assembly: solution.dll
    Syntax
    public static class CollectionHelper

    Fields

    Name Description
    CacheLineSize

    The size in bytes of the current platform's L1 cache lines.

    Methods

    Name Description
    Align(int, int)

    Returns an allocation size in bytes that factors in alignment.

    Align(ulong, ulong)

    Returns an allocation size in bytes that factors in alignment.

    CheckReflectionDataCorrect<T>(IntPtr)

    Checks that reflection data was properly registered for a job.

    ConvertExistingDataToNativeArray<T>(void*, int, AllocatorHandle, bool)

    Convert existing data into a NativeArray.

    ConvertExistingNativeListToNativeArray<T>(ref NativeList<T>, int, AllocatorHandle)

    Convert NativeList into a NativeArray.

    CreateNativeArray<T>(int, AllocatorHandle, NativeArrayOptions)

    Create a NativeArray, using a provided AllocatorHandle.

    CreateNativeArray<T>(NativeArray<T>, AllocatorHandle)

    Create a NativeArray from another NativeArray, using a provided AllocatorHandle.

    CreateNativeArray<T>(T[], AllocatorHandle)

    Create a NativeArray from a managed array, using a provided AllocatorHandle.

    CreateNativeArray<T, U>(int, ref U, NativeArrayOptions)

    Create a NativeArray, using a provided allocator that implements IAllocator.

    CreateNativeArray<T, U>(T[], ref U)

    Create a NativeArray from a managed array, using a provided Allocator.

    CreateNativeParallelMultiHashMap<TKey, TValue, U>(int, ref U)

    Create a NativeParallelMultiHashMap from a managed array, using a provided Allocator.

    DisposeNativeArray<T>(NativeArray<T>, AllocatorHandle)

    Dispose a NativeArray from an AllocatorHandle where it is allocated.

    Dispose<T>(NativeArray<T>)

    Dispose a NativeArray from an AllocatorHandle where it is allocated.

    Hash(void*, int)

    Returns a (non-cryptographic) hash of a memory block.

    IsAligned(ulong, int)

    Returns true if an offset has a given alignment.

    IsAligned(void*, int)

    Returns true if the address represented by the pointer has a given alignment.

    IsPowerOfTwo(int)

    Returns true if a positive value is a non-zero power of two.

    Log2Ceil(int)

    Returns the binary logarithm of the value, but the result is rounded up to the nearest integer.

    Log2Floor(int)

    Returns the binary logarithm of the value, but the result is rounded down to the nearest integer.

    In This Article
    Back to top
    Copyright © 2023 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)