Search Unity

NativeMultiHashMap

Discussion in 'Data Oriented Technology Stack' started by kaffiene, Oct 7, 2018.

  1. kaffiene

    kaffiene

    Joined:
    May 26, 2013
    Posts:
    21
    NativeMultiHashMap maps a key against multiple values. Its remove method removes a key (and therefore every value associated). Is there a mechanism to just remove a single value associated with a key?

    Is there any documentation for this class anywhere? I did a lot of Googling but all my ECS/Unity searches seem to go back to the same few introductory articles which aren't about NativeMultiHashMap :eek:)

    Cheers!

    Peter
     
    Last edited: Oct 8, 2018
  2. capyvara

    capyvara

    Joined:
    Mar 11, 2010
    Posts:
    70
    There's a method to remove a value based on a iterator which can be used to remove a single value:

    public void Remove(NativeMultiHashMapIterator<TKey> it)
     
    recursive likes this.
  3. kaffiene

    kaffiene

    Joined:
    May 26, 2013
    Posts:
    21
    Brilliant, thank you