mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
add labels and ordering for transform and parent systems in POST_UPDATE stage (#1456)
This commit is contained in:
parent
a895256925
commit
a5d2501b75
1 changed files with 17 additions and 4 deletions
|
@ -8,6 +8,7 @@ pub mod prelude {
|
|||
|
||||
use bevy_app::{prelude::*, startup_stage};
|
||||
use bevy_ecs::IntoSystem;
|
||||
use bevy_ecs::ParallelSystemDescriptorCoercion;
|
||||
use bevy_reflect::RegisterTypeBuilder;
|
||||
use prelude::{parent_update_system, Children, GlobalTransform, Parent, PreviousParent, Transform};
|
||||
|
||||
|
@ -22,15 +23,27 @@ impl Plugin for TransformPlugin {
|
|||
.register_type::<Transform>()
|
||||
.register_type::<GlobalTransform>()
|
||||
// add transform systems to startup so the first update is "correct"
|
||||
.add_startup_system_to_stage(startup_stage::POST_STARTUP, parent_update_system.system())
|
||||
.add_startup_system_to_stage(
|
||||
startup_stage::POST_STARTUP,
|
||||
transform_propagate_system::transform_propagate_system.system(),
|
||||
parent_update_system.system().label("parent_update_system"),
|
||||
)
|
||||
.add_startup_system_to_stage(
|
||||
startup_stage::POST_STARTUP,
|
||||
transform_propagate_system::transform_propagate_system
|
||||
.system()
|
||||
.label("transform_propagate_system")
|
||||
.after("parent_update_system"),
|
||||
)
|
||||
.add_system_to_stage(stage::POST_UPDATE, parent_update_system.system())
|
||||
.add_system_to_stage(
|
||||
stage::POST_UPDATE,
|
||||
transform_propagate_system::transform_propagate_system.system(),
|
||||
parent_update_system.system().label("parent_update_system"),
|
||||
)
|
||||
.add_system_to_stage(
|
||||
stage::POST_UPDATE,
|
||||
transform_propagate_system::transform_propagate_system
|
||||
.system()
|
||||
.label("transform_propagate_system")
|
||||
.after("parent_update_system"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue