fix feature gates
This commit is contained in:
parent
655a2f81b1
commit
bc3e4ca5d8
@ -168,7 +168,8 @@ pub fn reflect_auto_registration(meta: &ReflectMeta) -> Option<proc_macro2::Toke
|
|||||||
return None;
|
return None;
|
||||||
};
|
};
|
||||||
|
|
||||||
if cfg!(feature = "auto_register_static") {
|
#[cfg(feature = "auto_register_static")]
|
||||||
|
{
|
||||||
use std::{
|
use std::{
|
||||||
env, fs,
|
env, fs,
|
||||||
io::Write,
|
io::Write,
|
||||||
@ -222,7 +223,13 @@ pub fn reflect_auto_registration(meta: &ReflectMeta) -> Option<proc_macro2::Toke
|
|||||||
<#type_path as #bevy_reflect_path::__macro_exports::RegisterForReflection>::__register(registry);
|
<#type_path as #bevy_reflect_path::__macro_exports::RegisterForReflection>::__register(registry);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
#[cfg(all(
|
||||||
|
feature = "auto_register_inventory",
|
||||||
|
not(feature = "auto_register_static")
|
||||||
|
))]
|
||||||
|
{
|
||||||
Some(quote! {
|
Some(quote! {
|
||||||
#bevy_reflect_path::__macro_exports::auto_register::inventory::submit!{
|
#bevy_reflect_path::__macro_exports::auto_register::inventory::submit!{
|
||||||
#bevy_reflect_path::__macro_exports::auto_register::AutomaticReflectRegistrations(
|
#bevy_reflect_path::__macro_exports::auto_register::AutomaticReflectRegistrations(
|
||||||
|
Loading…
Reference in New Issue
Block a user