文档

Unity Engine

Unity Engine

NativeKeyValueArrays<TKey, TValue>

The keys and values of a hash map copied into two parallel arrays.
阅读时间1 分钟最后更新于 1 个月前

Definition

public struct NativeKeyValueArrays<TKey, TValue> : INativeDisposable, IDisposable where TKey : unmanaged where TValue : unmanaged

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.

Fields

Value

Description

KeysThe keys.
ValuesThe values.

Constructors

Properties

Property

Description

LengthThe number of key-value pairs.

Methods

Method

Description

DisposeReleases all resources (memory and safety handles).