Skip to content

Commit 8b8078d

Browse files
single parent set for transform propagate (#7869)
# Objective - have no system belonging to multiple sets go from ![before](https://user-images.githubusercontent.com/22177966/222439644-7cf2f84e-0839-4703-a7b4-66ffe92c6aa1.png) to ![after](https://user-images.githubusercontent.com/22177966/222439747-37872d59-6b8e-4fff-a579-6d40c38f73d3.png) ## Solution - `propagate_transforms in PropagateTransformSets in TransformSystem::TransformPropagate` instead of ``` propagate_transforms in PropagateTransformSets propagate_transforms in TransformSystem::TransformPropagate PropagateTransformsSet is free ``` Co-authored-by: Jakob Hellermann <hellermann@sipgate.de>
1 parent 9153bd0 commit 8b8078d

File tree

1 file changed

+3
-10
lines changed
  • crates/bevy_transform/src

1 file changed

+3
-10
lines changed

crates/bevy_transform/src/lib.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ impl Plugin for TransformPlugin {
100100
.add_plugin(ValidParentCheckPlugin::<GlobalTransform>::default())
101101
// add transform systems to startup so the first update is "correct"
102102
.configure_set(TransformSystem::TransformPropagate.in_base_set(CoreSet::PostUpdate))
103+
.configure_set(PropagateTransformsSet.in_set(TransformSystem::TransformPropagate))
103104
.edit_schedule(CoreSchedule::Startup, |schedule| {
104105
schedule.configure_set(
105106
TransformSystem::TransformPropagate.in_base_set(StartupSet::PostStartup),
@@ -113,20 +114,12 @@ impl Plugin for TransformPlugin {
113114
.in_set(TransformSystem::TransformPropagate)
114115
.ambiguous_with(PropagateTransformsSet),
115116
)
116-
.add_startup_system(
117-
propagate_transforms
118-
.in_set(TransformSystem::TransformPropagate)
119-
.in_set(PropagateTransformsSet),
120-
)
117+
.add_startup_system(propagate_transforms.in_set(PropagateTransformsSet))
121118
.add_system(
122119
sync_simple_transforms
123120
.in_set(TransformSystem::TransformPropagate)
124121
.ambiguous_with(PropagateTransformsSet),
125122
)
126-
.add_system(
127-
propagate_transforms
128-
.in_set(TransformSystem::TransformPropagate)
129-
.in_set(PropagateTransformsSet),
130-
);
123+
.add_system(propagate_transforms.in_set(PropagateTransformsSet));
131124
}
132125
}

0 commit comments

Comments
 (0)