diff --git a/crates/bevy_reflect/derive/src/impls/common.rs b/crates/bevy_reflect/derive/src/impls/common.rs index eed7e22455..c6507c6917 100644 --- a/crates/bevy_reflect/derive/src/impls/common.rs +++ b/crates/bevy_reflect/derive/src/impls/common.rs @@ -168,7 +168,8 @@ pub fn reflect_auto_registration(meta: &ReflectMeta) -> Option Option::__register(registry); } }) - } else { + } + + #[cfg(all( + feature = "auto_register_inventory", + not(feature = "auto_register_static") + ))] + { Some(quote! { #bevy_reflect_path::__macro_exports::auto_register::inventory::submit!{ #bevy_reflect_path::__macro_exports::auto_register::AutomaticReflectRegistrations(