mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-24 12:50:53 +00:00
Compare commits
2 Commits
4c04fc3173
...
746a643796
Author | SHA1 | Date | |
---|---|---|---|
|
746a643796 | ||
|
0b038de584 |
@ -8,7 +8,7 @@ use bevy::{
|
|||||||
},
|
},
|
||||||
gltf::{GltfExtras, GltfMaterialExtras, GltfMeshExtras, GltfSceneExtras},
|
gltf::{GltfExtras, GltfMaterialExtras, GltfMeshExtras, GltfSceneExtras},
|
||||||
hierarchy::Parent,
|
hierarchy::Parent,
|
||||||
log::debug,
|
log::{debug, warn},
|
||||||
reflect::{Reflect, TypeRegistration},
|
reflect::{Reflect, TypeRegistration},
|
||||||
utils::HashMap,
|
utils::HashMap,
|
||||||
};
|
};
|
||||||
@ -145,10 +145,12 @@ pub fn add_components_from_gltf_extras(world: &mut World) {
|
|||||||
|
|
||||||
{
|
{
|
||||||
let mut entity_mut = world.entity_mut(entity);
|
let mut entity_mut = world.entity_mut(entity);
|
||||||
type_registration
|
let Some(reflected_component) = type_registration.data::<ReflectComponent>() else {
|
||||||
.data::<ReflectComponent>()
|
warn!(?component, "unable to reflect component");
|
||||||
.expect("Unable to reflect component")
|
entity_mut.insert(GltfProcessed);
|
||||||
.insert(&mut entity_mut, &*component, &type_registry);
|
continue;
|
||||||
|
};
|
||||||
|
reflected_component.insert(&mut entity_mut, &*component, &type_registry);
|
||||||
|
|
||||||
entity_mut.insert(GltfProcessed); //
|
entity_mut.insert(GltfProcessed); //
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user