Skip to content
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

Run parent-update and transform-propagation during the "post-startup" stage (instead of "startup") #955

Merged
merged 2 commits into from
Nov 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ current changes on git with [previous release tags][git_tag_comparison].
- [Use `instant::Instant` for WASM compatibility][895]
- [Fixed duplicated children when spawning a Scene][904]
- [Corrected behaviour of the UI depth system][905]
- [Run parent-update and transform-propagation during the "post-startup" stage][955]

[821]: https://github.com/bevyengine/bevy/pull/821
[829]: https://github.com/bevyengine/bevy/pull/829
Expand All @@ -59,6 +60,7 @@ current changes on git with [previous release tags][git_tag_comparison].
[926]: https://github.com/bevyengine/bevy/pull/926
[931]: https://github.com/bevyengine/bevy/pull/931
[934]: https://github.com/bevyengine/bevy/pull/934
[955]: https://github.com/bevyengine/bevy/pull/955

## Version 0.3.0 (2020-11-03)

Expand Down
9 changes: 6 additions & 3 deletions crates/bevy_transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub mod prelude {
pub use crate::{components::*, hierarchy::*, TransformPlugin};
}

use bevy_app::prelude::*;
use bevy_app::{prelude::*, startup_stage};
use bevy_reflect::RegisterTypeBuilder;
use prelude::{parent_update_system, Children, GlobalTransform, Parent, PreviousParent, Transform};

Expand All @@ -21,8 +21,11 @@ impl Plugin for TransformPlugin {
.register_type::<Transform>()
.register_type::<GlobalTransform>()
// add transform systems to startup so the first update is "correct"
.add_startup_system(parent_update_system)
.add_startup_system(transform_propagate_system::transform_propagate_system)
.add_startup_system_to_stage(startup_stage::POST_STARTUP, parent_update_system)
.add_startup_system_to_stage(
startup_stage::POST_STARTUP,
transform_propagate_system::transform_propagate_system,
)
.add_system_to_stage(stage::POST_UPDATE, parent_update_system)
.add_system_to_stage(
stage::POST_UPDATE,
Expand Down