Skip to content

Commit 2041768

Browse files
james7132ItsDoot
authored andcommitted
Hierarchy commandization (bevyengine#4197)
## Objective Implement absolute minimum viable product for the changes proposed in bevyengine/rfcs#53. ## Solution - Remove public mutative access to `Parent` (Children is already publicly read-only). This includes public construction methods like `Copy`, `Clone`, and `Default`. - Remove `PreviousParent` - Remove `parent_update_system` - Update all hierarchy related commands to immediately update both `Parent` and `Children` references. ## Remaining TODOs - [ ] Update documentation for both `Parent` and `Children`. Discourage using `EntityCommands::remove` - [x] Add `HierarchyEvent` to notify listeners of hierarchy updates. This is meant to replace listening on `PreviousParent` ## Followup - These changes should be best moved to the hooks mentioned in bevyengine#3742. - Backing storage for both might be best moved to indexes mentioned in the same relations.
1 parent 788533f commit 2041768

File tree

13 files changed

+315
-441
lines changed

13 files changed

+315
-441
lines changed

crates/bevy_animation/src/lib.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use bevy_ecs::{
1515
schedule::ParallelSystemDescriptorCoercion,
1616
system::{Query, Res},
1717
};
18-
use bevy_hierarchy::{Children, HierarchySystem};
18+
use bevy_hierarchy::Children;
1919
use bevy_math::{Quat, Vec3};
2020
use bevy_reflect::{Reflect, TypeUuid};
2121
use bevy_time::Time;
@@ -295,9 +295,7 @@ impl Plugin for AnimationPlugin {
295295
.register_type::<AnimationPlayer>()
296296
.add_system_to_stage(
297297
CoreStage::PostUpdate,
298-
animation_player
299-
.before(TransformSystem::TransformPropagate)
300-
.after(HierarchySystem::ParentUpdate),
298+
animation_player.before(TransformSystem::TransformPropagate),
301299
);
302300
}
303301
}

0 commit comments

Comments
 (0)