Updating state in par_for_each #6979
-
Howdy, Rust & Bevy newbie here. I want to play around with an architecture that does a lot of compute-heavy work (AI/strategy, pathfinding) over an entirely read-only set of data, so that the system can lookup data from other entities while retaining full parallelization. Because I want to access other entities, I can't update anything in the closure. Therefore, I was going to use
It strikes me that there is no fundamental reason that Commands can't be issued in the workers; either I thought the tradeoffs of this architecture could be interesting:
Am I missing something? Is my architecture obviously bad? If so, why, and what are alternatives? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
there is https://docs.rs/bevy/latest/bevy/prelude/struct.ParallelCommands.html |
Beta Was this translation helpful? Give feedback.
there is https://docs.rs/bevy/latest/bevy/prelude/struct.ParallelCommands.html