Skip to content

Commit 52d6799

Browse files
authored
Run parent-update and transform-propagation during the "post-startup" stage (instead of "startup") (#955)
* Propagate transforms during the POST_STARTUP start-up stage * Update changelog
1 parent 1f3d506 commit 52d6799

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ current changes on git with [previous release tags][git_tag_comparison].
3939
- [Use `instant::Instant` for WASM compatibility][895]
4040
- [Fixed duplicated children when spawning a Scene][904]
4141
- [Corrected behaviour of the UI depth system][905]
42+
- [Run parent-update and transform-propagation during the "post-startup" stage][955]
4243

4344
[821]: https://github.com/bevyengine/bevy/pull/821
4445
[829]: https://github.com/bevyengine/bevy/pull/829
@@ -59,6 +60,7 @@ current changes on git with [previous release tags][git_tag_comparison].
5960
[926]: https://github.com/bevyengine/bevy/pull/926
6061
[931]: https://github.com/bevyengine/bevy/pull/931
6162
[934]: https://github.com/bevyengine/bevy/pull/934
63+
[955]: https://github.com/bevyengine/bevy/pull/955
6264

6365
## Version 0.3.0 (2020-11-03)
6466

crates/bevy_transform/src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub mod prelude {
66
pub use crate::{components::*, hierarchy::*, TransformPlugin};
77
}
88

9-
use bevy_app::prelude::*;
9+
use bevy_app::{prelude::*, startup_stage};
1010
use bevy_reflect::RegisterTypeBuilder;
1111
use prelude::{parent_update_system, Children, GlobalTransform, Parent, PreviousParent, Transform};
1212

@@ -21,8 +21,11 @@ impl Plugin for TransformPlugin {
2121
.register_type::<Transform>()
2222
.register_type::<GlobalTransform>()
2323
// add transform systems to startup so the first update is "correct"
24-
.add_startup_system(parent_update_system)
25-
.add_startup_system(transform_propagate_system::transform_propagate_system)
24+
.add_startup_system_to_stage(startup_stage::POST_STARTUP, parent_update_system)
25+
.add_startup_system_to_stage(
26+
startup_stage::POST_STARTUP,
27+
transform_propagate_system::transform_propagate_system,
28+
)
2629
.add_system_to_stage(stage::POST_UPDATE, parent_update_system)
2730
.add_system_to_stage(
2831
stage::POST_UPDATE,

0 commit comments

Comments
 (0)