Skip to content

Commit 66369bc

Browse files
committed
Fix
1 parent 8a4a9b3 commit 66369bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/bevy_scene/src/dynamic_scene.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ impl DynamicScene {
7171
let entity = *entity_map
7272
.entry(bevy_ecs::entity::Entity::from_raw(scene_entity.entity))
7373
.or_insert_with(|| world.spawn_empty().id());
74+
let entity_mut = &mut world.entity_mut(entity);
7475

7576
// Apply/ add each component to the given entity.
7677
for component in &scene_entity.components {
@@ -89,7 +90,7 @@ impl DynamicScene {
8990
// If the entity already has the given component attached,
9091
// just apply the (possibly) new value, otherwise add the
9192
// component to the entity.
92-
reflect_component.apply_or_insert(world, entity, &**component);
93+
reflect_component.apply_or_insert(entity_mut, &**component);
9394
}
9495
}
9596

0 commit comments

Comments
 (0)