Compare commits

..

1 Commits

Author SHA1 Message Date
Mark Moissette
4c04fc3173
Merge aff11cca4c into 9b50d77790 2024-07-28 22:01:06 +00:00

View File

@ -8,7 +8,7 @@ use bevy::{
},
gltf::{GltfExtras, GltfMaterialExtras, GltfMeshExtras, GltfSceneExtras},
hierarchy::Parent,
log::{debug, warn},
log::debug,
reflect::{Reflect, TypeRegistration},
utils::HashMap,
};
@ -145,12 +145,10 @@ pub fn add_components_from_gltf_extras(world: &mut World) {
{
let mut entity_mut = world.entity_mut(entity);
let Some(reflected_component) = type_registration.data::<ReflectComponent>() else {
warn!(?component, "unable to reflect component");
entity_mut.insert(GltfProcessed);
continue;
};
reflected_component.insert(&mut entity_mut, &*component, &type_registry);
type_registration
.data::<ReflectComponent>()
.expect("Unable to reflect component")
.insert(&mut entity_mut, &*component, &type_registry);
entity_mut.insert(GltfProcessed); //
}