Compare commits

..

1 Commits

Author SHA1 Message Date
Mark Moissette 31ee4df6a6
Merge 33f2809682 into 9b50d77790 2024-08-09 10:24:34 +00:00
1 changed files with 4 additions and 9 deletions

View File

@ -69,15 +69,10 @@ impl CopyComponents {
} }
}) })
.map(|type_id| { .map(|type_id| {
match type_id.data::<ReflectComponent>() { return (
Some(data) => ( type_id.data::<ReflectComponent>().unwrap().clone(),
data.clone(),
type_id.type_info().type_id(), // we need the original type_id down the line 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<_>>()
}; };