diff --git a/crates/bevy_core/src/transform/world_builder.rs b/crates/bevy_core/src/transform/world_builder.rs index 1f4efc6d8c..85a8d31ec2 100644 --- a/crates/bevy_core/src/transform/world_builder.rs +++ b/crates/bevy_core/src/transform/world_builder.rs @@ -34,6 +34,11 @@ impl<'a> WorldBuilder<'a> { self } + pub fn set_entity(&mut self, entity: Entity) -> &mut Self { + self.current_entity = Some(entity); + self + } + /// note: this is slow and does a full entity copy pub fn with(&mut self, component: T) -> &mut Self where @@ -114,6 +119,11 @@ impl<'a> CommandBufferBuilder<'a> { self } + pub fn set_entity(&mut self, entity: Entity) -> &mut Self { + self.current_entity = Some(entity); + self + } + // note: this is slow and does a full entity copy pub fn with(&mut self, component: T) -> &mut Self where