queue is ECS/DOTS

Hello,

I would like to create a system where buildings can create a task and then put it in a queue with a few variables(probably an array would make more sense). Once the task are in the queue, I would like for an agent to pick up the task from the queue and go to that specific building.

I have started learning the ECS/DOTS, however I am not certain how to queue items and them dequeue while everything is running in parallels. My worry is that the different threads do not talk to each other. I could be wrong on this it could be my lack of understanding on the ecs still.

Would anyone know anything about this or be able to point me in the right direction.

I haven’t used ECS/DOTS much, but my go to whenever I need a multithreaded queue is ConcurrentQueue. I don’t know if it is useful for ECS/DOTS.

1 Like