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
31ee4df6a6
...
d59d34127d
Author | SHA1 | Date | |
---|---|---|---|
|
d59d34127d | ||
|
5daf433b06 |
@ -69,10 +69,15 @@ impl CopyComponents {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.map(|type_id| {
|
.map(|type_id| {
|
||||||
return (
|
match type_id.data::<ReflectComponent>() {
|
||||||
type_id.data::<ReflectComponent>().unwrap().clone(),
|
Some(data) => (
|
||||||
type_id.type_info().type_id(), // we need the original type_id down the line
|
data.clone(),
|
||||||
);
|
type_id.type_info().type_id(), // we need the original type_id down the line
|
||||||
|
),
|
||||||
|
None => {
|
||||||
|
panic!("type {:?}'s ReflectComponent data was not found in the type registry, this could be because the type is missing a #[reflect(Component)]", type_id.type_info().type_path());
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user