Change detection doesn't work inside parallel queries #8656
Labels
A-ECS
Entities, components, systems, and events
C-Bug
An unexpected or incorrect behavior
S-Duplicate
This issue or PR already exists
Bevy version
0.10.0
What you did
I have a query using a Ref parameter and is_changed() to detect if one of two conditions (position changed or override flag) is true in order to avoid calculating FoV every frame. Since it's an expensive operation, I also want to use par_iter_mut in order to make the query parallel.
My problem is that, once I add par_iter_mut to my query, change detection seems to break and position.is_changed() is never true.
Example code
What went wrong
I would expect change detection to work in either case, but it seems to only work with sequential queries.
Additional information
In case it changes something, the specific query I'm having trouble with is also inside a ParamSet.
Also, this is a regression from bevy 0.9, where it worked fine.
The text was updated successfully, but these errors were encountered: