Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


NativeHashMap<TKey, TValue>.ReadOnly

A read-only alias for the value of a NativeHashMap. Does not have its own allocated storage.
Read time 1 minuteLast updated 10 days ago

Definition

public struct NativeHashMap<TKey, TValue>.ReadOnly : IEnumerable<KVPair<TKey, TValue>>, IEnumerable

Properties

Property

Description

CapacityThe number of key-value pairs that fit in the current allocation.
CountThe current number of key-value pairs in this hash map.
IsCreatedWhether this hash map has been allocated (and not yet deallocated).
IsEmptyWhether this hash map is empty.
this[]Gets values by key.

Methods

Method

Description

ContainsKeyReturns true if a given key is present in this hash map.
GetEnumeratorReturns an enumerator over the key-value pairs of this hash map.
GetKeyArrayReturns an array with a copy of all this hash map's keys (in no particular order).
GetKeyValueArraysReturns a NativeKeyValueArrays with a copy of all this hash map's keys and values.
GetValueArrayReturns an array with a copy of all this hash map's values (in no particular order).
TryGetValueReturns the value associated with a key.