NoAllocHashMap
1 min read • 134 wordsnamespace InitialPrefabs.Collections
A stack only dictionary that stores a key value pair.
Any type implementing IEquatable{T}
Any type
bool TryAdd(K key, V item)
Attempts to add a value given a key if it does not exist.
| Parameter | Description |
|---|---|
| key | A unique identifier |
| item | The value to associate with the key |
bool - True, if successfully added
bool TryGetValue(K key, out V value)
Attempts to get a value given a key.
| Parameter | Description |
|---|---|
| key | The unique id to look for |
| value | The value stored in the hash map |
bool - True, if successfully retrieved, otherwise false
void Clear()
Removes all elements in the hashmap.
Go back to API Home