Skip to content

Commit 6d8860b

Browse files
committed
fix compile again
1 parent 4ef886d commit 6d8860b

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

crates/bevy_transform/src/systems.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,23 @@ pub fn mark_dirty_trees(
6161
}
6262

6363
#[cfg(not(feature = "std"))]
64+
use alloc::vec::Vec;
65+
66+
#[cfg(not(feature = "std"))]
67+
/// Update [`GlobalTransform`] component of entities based on entity hierarchy and [`Transform`]
68+
/// component.
69+
///
70+
/// Third party plugins should ensure that this is used in concert with
71+
/// [`sync_simple_transforms`] and [`mark_dirty_trees`].
6472
pub fn propagate_parent_transforms(
65-
mut root_query: Query<
66-
(Entity, &Children, Ref<Transform>, &mut GlobalTransform),
67-
Without<ChildOf>,
68-
>,
69-
mut orphaned: RemovedComponents<ChildOf>,
73+
root_query: Query<(Entity, &Children, Ref<Transform>, &mut GlobalTransform), Without<ChildOf>>,
74+
orphaned: RemovedComponents<ChildOf>,
7075
transform_query: Query<
7176
(Ref<Transform>, &mut GlobalTransform, Option<&Children>),
7277
With<ChildOf>,
7378
>,
7479
child_query: Query<(Entity, Ref<ChildOf>), With<GlobalTransform>>,
75-
mut orphaned_entities: Local<Vec<Entity>>,
80+
orphaned_entities: Local<Vec<Entity>>,
7681
) {
7782
hierarchy_propagate_complex::<TransformPropagate>(
7883
root_query,
@@ -87,11 +92,8 @@ pub fn propagate_parent_transforms(
8792
use bevy_ecs::hierarchy_propagate::parallel::{NodeQuery, WorkQueue};
8893

8994
#[cfg(feature = "std")]
90-
/// Update [`GlobalTransform`] component of entities based on entity hierarchy and [`Transform`]
91-
/// component.
92-
///
93-
/// This is now implemented using the generic hierarchy propagation framework.
94-
/// For direct usage, consider using `hierarchy_propagate_complex::<TransformPropagate>` instead.
95+
/// Parallel hierarchy traversal with a batched work sharing scheduler. Often 2-5 times faster than
96+
/// the serial version.
9597
pub fn propagate_parent_transforms(
9698
queue: Local<WorkQueue>,
9799
roots: Query<

0 commit comments

Comments
 (0)