mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-22 03:50:52 +00:00
feat(Blenvy:Bevy): changed panic! in component string parsing to be a simple warning
(might make further changes to this down the line)
This commit is contained in:
parent
ce17f723b1
commit
55a4deac1c
@ -69,14 +69,21 @@ fn components_string_to_components(
|
|||||||
let mut deserializer = ron::Deserializer::from_str(ron_string.as_str())
|
let mut deserializer = ron::Deserializer::from_str(ron_string.as_str())
|
||||||
.expect("deserialzer should have been generated from string");
|
.expect("deserialzer should have been generated from string");
|
||||||
let reflect_deserializer = ReflectDeserializer::new(type_registry);
|
let reflect_deserializer = ReflectDeserializer::new(type_registry);
|
||||||
let component = reflect_deserializer
|
/*let component = reflect_deserializer
|
||||||
.deserialize(&mut deserializer)
|
.deserialize(&mut deserializer)
|
||||||
.unwrap_or_else(|_| {
|
.unwrap_or_else(|_| {
|
||||||
panic!(
|
panic!(
|
||||||
"failed to deserialize component {} with value: {:?}",
|
"failed to deserialize component {} with value: {:?}",
|
||||||
name, value
|
name, value
|
||||||
)
|
)
|
||||||
});
|
});*/
|
||||||
|
let Ok(component) = reflect_deserializer.deserialize(&mut deserializer) else {
|
||||||
|
warn!(
|
||||||
|
"failed to deserialize component {} with value: {:?}",
|
||||||
|
name, value
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
debug!("component {:?}", component);
|
debug!("component {:?}", component);
|
||||||
debug!("real type {:?}", component.get_represented_type_info());
|
debug!("real type {:?}", component.get_represented_type_info());
|
||||||
|
Loading…
Reference in New Issue
Block a user