-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Remove all existing system order ambiguities in DefaultPlugins
#15031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fe1464b
5b157e9
f2e8b3a
09c4f6d
b223592
a3c9438
3e7f19f
f9d812e
83a9d50
3a44b6e
b92c656
0296a01
1c08024
873d4bc
51b4da2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,6 +90,11 @@ impl Plugin for IgnoreAmbiguitiesPlugin { | |
bevy_animation::advance_animations, | ||
bevy_ui::ui_layout_system, | ||
); | ||
app.ignore_ambiguity( | ||
bevy_app::PostUpdate, | ||
bevy_animation::animate_targets, | ||
bevy_ui::ui_layout_system, | ||
); | ||
Comment on lines
+93
to
+97
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I appreciate the previous context comments, that said I can understand they are difficult to balance for maintainability and correctness. does that refer to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was justified using the comments just a few lines up (line 85), which state that UI cannot be animated :) I'd like to change that eventually of course! |
||
} | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -496,12 +496,19 @@ pub enum ShadowFilteringMethod { | |
Temporal, | ||
} | ||
|
||
/// System sets used to run light-related systems. | ||
#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)] | ||
pub enum SimulationLightSystems { | ||
AddClusters, | ||
AssignLightsToClusters, | ||
/// System order ambiguities between systems in this set are ignored: | ||
alice-i-cecile marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/// each [`build_directional_light_cascades`] system is independent of the others, | ||
/// and should operate on distinct sets of entities. | ||
UpdateDirectionalLightCascades, | ||
Comment on lines
+504
to
507
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (out of scope for this PR) is this an opportunity to add a macro to mark that ambiguity is allowed there ? (for better type safety, avoid outdated comments) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, possibly. "Ignore all ambiguities with self in set" isn't a common pattern, but it's not a rare one. |
||
UpdateLightFrusta, | ||
/// System order ambiguities between systems in this set are ignored: | ||
/// the order of systems within this set is irrelevant, as the various visibility-checking systesms | ||
/// assumes that their operations are irreversible during the frame. | ||
CheckLightVisibility, | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,7 +164,9 @@ impl Plugin for UiPlugin { | |
update_target_camera_system.in_set(UiSystem::Prepare), | ||
ui_layout_system | ||
.in_set(UiSystem::Layout) | ||
.before(TransformSystem::TransformPropagate), | ||
.before(TransformSystem::TransformPropagate) | ||
// Text and Text2D operate on disjoint sets of entities | ||
.ambiguous_with(bevy_text::update_text2d_layout), | ||
ui_stack_system | ||
.in_set(UiSystem::Stack) | ||
// the systems don't care about stack index | ||
|
@@ -226,7 +228,8 @@ fn build_text_interop(app: &mut App) { | |
.in_set(UiSystem::PostLayout) | ||
.after(bevy_text::remove_dropped_font_atlas_sets) | ||
// Text2d and bevy_ui text are entirely on separate entities | ||
.ambiguous_with(bevy_text::update_text2d_layout), | ||
.ambiguous_with(bevy_text::update_text2d_layout) | ||
.ambiguous_with(bevy_text::calculate_bounds_text2d), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe these two should be in a single set to ignore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Possibly: I wanted to keep the changes relatively minimal though. |
||
), | ||
); | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.