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 8a4a9b3 commit 66369bcCopy full SHA for 66369bc
crates/bevy_scene/src/dynamic_scene.rs
@@ -71,6 +71,7 @@ impl DynamicScene {
71
let entity = *entity_map
72
.entry(bevy_ecs::entity::Entity::from_raw(scene_entity.entity))
73
.or_insert_with(|| world.spawn_empty().id());
74
+ let entity_mut = &mut world.entity_mut(entity);
75
76
// Apply/ add each component to the given entity.
77
for component in &scene_entity.components {
@@ -89,7 +90,7 @@ impl DynamicScene {
89
90
// If the entity already has the given component attached,
91
// just apply the (possibly) new value, otherwise add the
92
// component to the entity.
- reflect_component.apply_or_insert(world, entity, &**component);
93
+ reflect_component.apply_or_insert(entity_mut, &**component);
94
}
95
96
0 commit comments