-
Notifications
You must be signed in to change notification settings - Fork 399
Closed
Description
Before:
struct Foo;
impl EntityCommand for Foo {
fn apply(self, entity: Entity, world: &mut World) {
world
.run_system_cached_with(print_entity, entity)
.unwrap();
}
}
fn print_entity(In(entity): In<Entity>) {
info!("entity: {entity}");
}After:
struct Foo;
impl EntityCommand for Foo {
fn apply(self, entity_world: EntityWorldMut) {
let entity = entity_world.id();
entity_world
.into_world_mut()
.run_system_cached_with(print_entity, entity)
.unwrap();
}
}
fn print_entity(In(entity): In<Entity>) {
info!("entity: {entity}");
}I failed to find the commit that changed this, so other related methods may also have been changed.
Note that the .id() API call is a bit strange; I would have expected the method to be called .entity().