bevy-inspector-egui icon indicating copy to clipboard operation
bevy-inspector-egui copied to clipboard

Inspector systems are ambiguous with the entire Update schedule

Open nfagerlund opened this issue 2 years ago • 1 comments

Since inspector_ui<T> and world_inspector_ui take a &mut World and go in the Update schedule, Bevy's ambiguity_detection reporting shows them as having conflicting data access and indeterminate ordering with basically everything. So, your legit determinism problems get drowned out by pairs like these:

 -- world_inspector_ui and mobile_fixed_velocity (in set MovePlanners)
    conflict on: bevy_ecs::world::World
 -- world_inspector_ui and launch_and_fall (in set MovePlanners)
    conflict on: bevy_ecs::world::World
 -- world_inspector_ui and mobile_chase_entity (in set MovePlanners)
    conflict on: bevy_ecs::world::World

Thoughts:

  • Ordering every gameplay system relative to these seems silly.
  • Yanking out the inspector systems every time I want determinism warnings is also a drag.
  • Logically, it seems like these systems belong in a dedicated schedule or something. I don't know if there's extra overhead to doing that, but I note that that's what they ended up doing with scene_spawner_system, which had the same problem in 0.11.x.
  • If a dedicated schedule's a non-starter, then maybe just moving to a built-in schedule that's not Update would help.
  • If they still need to go in Update for some reason that I haven't understood yet, maybe there could be a setting in the plugin constructors to mark them as .ambiguous_with_all() (to silence the warnings if you're just using inspectors for dev/debug and not for player-facing gameplay interface).

nfagerlund avatar Nov 25 '23 05:11 nfagerlund

Not using Update would be really helpful for system stepping too. Currently the inspector gui flashes as I step through my systems.

AlexAegis avatar May 01 '24 14:05 AlexAegis

bit of a late close but I think this should be fixed by https://github.com/jakobhellermann/bevy-inspector-egui/pull/201

jakobhellermann avatar Aug 12 '25 19:08 jakobhellermann