Struct NativeKeyValueArrays<TKey, TValue>
The keys and values of a hash map copied into two parallel arrays.
Implements
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. |