I look inside Collection package and they have the same data and identical function.
With exception that NativeHashMap allow you to get value by key. While MultiHashMap only allow you to
GetFirst and GetNext value.
I do not have experience programming background. They both are dictionary to me.
Can anyone clarify how each of these use in what cases?
NativeHashMap - A normal dictionary mapping a key to a single value.
NativeMultiHashMap - A dictionary mapping a key to 1 or more values, like a list.
When iterating over the list of MultiHashMap you would use TryGetFirstValue, if that is true, use that value, then use TryGetNextValue until it is false.
NativeHashMap has all uses of Dictionary, you need to tie some value to another value.
MultiHashMap can be used for grouping things like in boid sample you hash positions of boids and then you have all boids from one secton under one hash.
How would I set that up? Please help, I am trying to find out how it can be done, but I can’t seem to find a good way to update the values of the elements of a list under the key.