Sort entities with nob

Hi,

I have a system which tells me if resource in a storage needs to update a lot of datas.

For that each system which can says “this resource in this storage have to be update”, create a new entity with a simple component.

Public struct updateStorageResource : IComponentData
{
   Entity Storage;
   Entity Resource;
}

So, I have a job which sort these components for have distinct storage list which knows his distinct resources to update.

My problem is I try to implement that in a nativeHashmap<Entity,NativeList> but native container can not have entity :(.

How do you do guys for sort entities in job ?

It can have entities as elements but not another container.

You can use NativeMultiHashMap<Entity, Entity>.

2 Likes

Native container can’t have other native container

Too slow, as always. :stuck_out_tongue:

:rage: In one day…you lose:smile:

Oh nice, thanks guys :wink: