
# Objective Extracts the state mechanisms into a new crate called "bevy_state". This comes with a few goals: - state wasn't really an inherent machinery of the ecs system, and so keeping it within bevy_ecs felt forced - by mixing it in with bevy_ecs, the maintainability of our more robust state system was significantly compromised moving state into a new crate makes it easier to encapsulate as it's own feature, and easier to read and understand since it's no longer a single, massive file. ## Solution move the state-related elements from bevy_ecs to a new crate ## Testing - Did you test these changes? If so, how? all the automated tests migrated and passed, ran the pre-existing examples without changes to validate. --- ## Migration Guide Since bevy_state is now gated behind the `bevy_state` feature, projects that use state but don't use the `default-features` will need to add that feature flag. Since it is no longer part of bevy_ecs, projects that use bevy_ecs directly will need to manually pull in `bevy_state`, trigger the StateTransition schedule, and handle any of the elements that bevy_app currently sets up. --------- Co-authored-by: Kristoffer Søholm <k.soeholm@gmail.com>
69 lines
1.6 KiB
Rust
69 lines
1.6 KiB
Rust
#[doc(hidden)]
|
|
pub use crate::{
|
|
app::prelude::*, core::prelude::*, ecs::prelude::*, hierarchy::prelude::*, input::prelude::*,
|
|
log::prelude::*, math::prelude::*, reflect::prelude::*, time::prelude::*,
|
|
transform::prelude::*, utils::prelude::*, window::prelude::*, DefaultPlugins, MinimalPlugins,
|
|
};
|
|
|
|
pub use bevy_derive::{bevy_main, Deref, DerefMut};
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_asset")]
|
|
pub use crate::asset::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_audio")]
|
|
pub use crate::audio::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_animation")]
|
|
pub use crate::animation::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_color")]
|
|
pub use crate::color::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_core_pipeline")]
|
|
pub use crate::core_pipeline::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_pbr")]
|
|
pub use crate::pbr::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_render")]
|
|
pub use crate::render::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_scene")]
|
|
pub use crate::scene::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_sprite")]
|
|
pub use crate::sprite::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_text")]
|
|
pub use crate::text::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_ui")]
|
|
pub use crate::ui::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_dynamic_plugin")]
|
|
pub use crate::dynamic_plugin::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_gizmos")]
|
|
pub use crate::gizmos::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_gilrs")]
|
|
pub use crate::gilrs::*;
|
|
|
|
#[doc(hidden)]
|
|
#[cfg(feature = "bevy_state")]
|
|
pub use crate::state::prelude::*;
|