Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rewin123 committed Sep 28, 2024
1 parent 5b75739 commit b02548d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/prefab/src/editor_registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,12 @@ impl EditorRegistryExt for App {
) -> &mut Self {
if let Some(mut registry) = self.world_mut().get_resource_mut::<EditorRegistry>() {
registry.register::<T>();
if registry.registry.read().get_type_data::<ReflectComponent>(T::get_type_registration().type_id()).is_none() {
if registry
.registry
.read()
.get_type_data::<ReflectComponent>(T::get_type_registration().type_id())
.is_none()
{
warn!("Component {} has no #[reflect(Component)] attribute. It will not allow to be saved in prefab", std::any::type_name::<T>());
}
};
Expand Down

0 comments on commit b02548d

Please sign in to comment.