We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cdc75d commit ab9bf68Copy full SHA for ab9bf68
crates/bevy_ecs/src/world/entity_ref.rs
@@ -1323,6 +1323,10 @@ impl<'w> EntityWorldMut<'w> {
1323
world.removed_components.send(component_id, self.entity);
1324
}
1325
1326
+ // Observers and on_remove hooks may reserve new entities, which
1327
+ // requires a flush before Entities::free may be called.
1328
+ world.flush_entities();
1329
+
1330
let location = world
1331
.entities
1332
.free(self.entity)
0 commit comments