{!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} Struct NativeKeyValueArrays<TKey, TValue> | Collections | 2.3.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct NativeKeyValueArrays<TKey, TValue>

    The keys and values of a hash map copied into two parallel arrays.

    Implements
    INativeDisposable
    Namespace: Unity.Collections
    Assembly: solution.dll
    Syntax
    public struct NativeKeyValueArrays<TKey, TValue> : INativeDisposable where TKey : unmanaged where TValue : unmanaged
    Type Parameters
    Name Description
    TKey

    The type of the keys.

    TValue

    The type of the values.

    Remarks

    For each key-value pair copied from the hash map, the key is stored in Keys[i] while the value is stored in Values[i] (for the same i).

     NativeKeyValueArrays is not actually itself a native collection: it contains a NativeArray for the keys and a NativeArray for the values,
     but a NativeKeyValueArrays does not have its own safety handles.
    

    Constructors

    Name Description
    NativeKeyValueArrays(int, AllocatorHandle, NativeArrayOptions)

    Initializes and returns an instance of NativeKeyValueArrays.

    Fields

    Name Description
    Keys

    The keys.

    Values

    The values.

    Properties

    Name Description
    Length

    The number of key-value pairs.

    Methods

    Name Description
    Dispose()

    Releases all resources (memory and safety handles).

    Dispose(JobHandle)

    Creates and schedules a job that will dispose this collection's key and value arrays.

    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)