Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

UnsafeParallelMultiHashMap<T0,T1>

struct in Unity.Collections.LowLevel.Unsafe


Implements interfaces:INativeDisposable

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

An unordered, expandable associative array. Each key can have more than one associated value.

Unlike a regular UnsafeParallelHashMap, an UnsafeParallelMultiHashMap can store multiple key-value pairs with the same key.

The keys are not deduplicated: two key-value pairs with the same key are stored as fully separate key-value pairs.

Static Properties

Property Description
MaxCapacity The maximum number of elements this type of container can hold.

Properties

Property Description
Capacity Returns the number of key-value pairs that fit in the current allocation.
IsCreated Whether this hash map has been allocated (and not yet deallocated).
IsEmpty Whether this hash map is empty.

Constructors

Constructor Description
UnsafeParallelMultiHashMap_2 Initializes and returns an instance of UnsafeParallelMultiHashMap.

Public Methods

Method Description
Add Adds a new key-value pair.
AsParallelWriter Returns a parallel writer for this hash map.
AsReadOnly Returns a readonly version of this NativeParallelHashMap instance.
Clear Removes all key-value pairs.
ContainsKey Returns true if a given key is present in this hash map.
Count Returns the current number of key-value pairs in this hash map.
CountValuesForKey Returns the number of values associated with a given key.
Dispose Releases all resources (memory and safety handles).
GetEnumerator Returns an enumerator over the key-value pairs of this hash map.
GetKeyArray Returns an array with a copy of all the keys (in no particular order).
GetKeyValueArrays Returns a NativeKeyValueArrays with a copy of all the keys and values (in no particular order).
GetValueArray Returns an array with a copy of all the values (in no particular order).
GetValuesForKey Returns an enumerator over the values of an individual key.
Remove Removes a key and its associated value(s).
SetValue Sets a new value for an existing key-value pair.
TryGetFirstValue Gets an iterator for a key.
TryGetNextValue Advances an iterator to the next value associated with its key.