diff --git a/Cargo.toml b/Cargo.toml index 9155c72..fe76434 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -98,8 +98,10 @@ tokio = ["dep:tokio"] url = ["dep:url"] ## [either](https://docs.rs/either) crate either = ["dep:either"] -# [bevy_ecs](https://docs.rs/bevy_ecs) and [bevy_input](https://docs.rs/bevy_input) crate -bevy = ["dep:bevy_ecs", "dep:bevy_input"] +# [bevy_ecs](https://docs.rs/bevy_ecs) +bevy_ecs = ["dep:bevy_ecs"] +# [bevy_input](https://docs.rs/bevy_input) +bevy_input = ["dep:bevy_input", "dep:bevy_ecs", "dep:glam"] [dependencies] specta-macros = { version = "=2.0.0-rc.9", path = "./macros" } diff --git a/src/type/impls.rs b/src/type/impls.rs index c6b418e..86df90b 100644 --- a/src/type/impls.rs +++ b/src/type/impls.rs @@ -751,13 +751,16 @@ impl Type for either::Either { } } -#[cfg(feature = "bevy")] +#[cfg(feature = "bevy_ecs")] const _: () = { #[derive(Type)] #[specta(rename = "Entity", remote = bevy_ecs::entity::Entity, crate = crate, export = false)] #[allow(dead_code)] struct EntityDef(u64); +}; +#[cfg(feature = "bevy_input")] +const _: () = { #[derive(Type)] #[specta(remote = bevy_input::ButtonState, crate = crate, export = false)] #[allow(dead_code)]