pub trait BuildChildrenTransformExt {
// Required methods
fn set_parent_in_place(&mut self, parent: Entity) -> &mut Self;
fn remove_parent_in_place(&mut self) -> &mut Self;
}
bevy-support
only.Expand description
Collection of methods similar to BuildChildren
, but preserving each
entity’s GlobalTransform
.
Required Methods§
Sourcefn set_parent_in_place(&mut self, parent: Entity) -> &mut Self
fn set_parent_in_place(&mut self, parent: Entity) -> &mut Self
Change this entity’s parent while preserving this entity’s GlobalTransform
by updating its Transform
.
See BuildChildren::set_parent
for a method that doesn’t update the
Transform
.
Note that both the hierarchy and transform updates will only execute
the next time commands are applied
(during apply_deferred
).
Sourcefn remove_parent_in_place(&mut self) -> &mut Self
fn remove_parent_in_place(&mut self) -> &mut Self
Make this entity parentless while preserving this entity’s GlobalTransform
by updating its Transform
to be equal to its current GlobalTransform
.
See BuildChildren::remove_parent
for a method that doesn’t update the
Transform
.
Note that both the hierarchy and transform updates will only execute
the next time commands are applied
(during apply_deferred
).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.