I have a buffer of elements that can be divided by groups. Some systems needs to operate only on specific type of those element. Is using NativeMultiHashMap inside a separate component would benefit me?
I'm collecting collisions from sides of the character and storing them in buffer. Systems, like grounding needs to operate on bottom part. In my case I believe linear search would not make such performance impact, but I wonder, how to approach making lookup in Unity ECS.
If lookup is not a great option, I believe I can do some tricks. Like collecting collisions in order (0-4 for top, 5-9 for right side,etc.) and then make range based iteration when I need.
Can someone discuss it with me?