bevy/crates/bevy_internal/src/prelude.rs

45 lines
1.1 KiB
Rust
Raw Normal View History

#[doc(hidden)]
pub use crate::{
Split bevy_hierarchy out from bevy_transform (#4168) # Objective - Hierarchy tools are not just used for `Transform`: they are also used for scenes. - In the future there's interest in using them for other features, such as visiibility inheritance. - The fact that these tools are found in `bevy_transform` causes a great deal of user and developer confusion - Fixes #2758. ## Solution - Split `bevy_transform` into two! - Make everything work again. Note that this is a very tightly scoped PR: I *know* there are code quality and docs issues that existed in bevy_transform that I've just moved around. We should fix those in a seperate PR and try to merge this ASAP to reduce the bitrot involved in splitting an entire crate. ## Frustrations The API around `GlobalTransform` is a mess: we have massive code and docs duplication, no link between the two types and no clear way to extend this to other forms of inheritance. In the medium-term, I feel pretty strongly that `GlobalTransform` should be replaced by something like `Inherited<Transform>`, which lives in `bevy_hierarchy`: - avoids code duplication - makes the inheritance pattern extensible - links the types at the type-level - allows us to remove all references to inheritance from `bevy_transform`, making it more useful as a standalone crate and cleaning up its docs ## Additional context - double-blessed by @cart in https://github.com/bevyengine/bevy/issues/4141#issuecomment-1063592414 and https://github.com/bevyengine/bevy/issues/2758#issuecomment-913810963 - preparation for more advanced / cleaner hierarchy tools: go read https://github.com/bevyengine/rfcs/pull/53 ! - originally attempted by @finegeometer in #2789. It was a great idea, just needed more discussion! Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2022-03-15 01:54:05 +00:00
app::prelude::*, asset::prelude::*, core::prelude::*, ecs::prelude::*, hierarchy::prelude::*,
input::prelude::*, log::prelude::*, math::prelude::*, reflect::prelude::*, scene::prelude::*,
transform::prelude::*, utils::prelude::*, window::prelude::*, DefaultPlugins, MinimalPlugins,
};
2020-07-31 19:26:36 +00:00
2020-11-12 21:26:48 +00:00
pub use bevy_derive::bevy_main;
#[doc(hidden)]
2020-07-31 19:26:36 +00:00
#[cfg(feature = "bevy_audio")]
pub use crate::audio::prelude::*;
2020-09-15 19:20:20 +00:00
#[doc(hidden)]
#[cfg(feature = "bevy_core_pipeline")]
pub use crate::core_pipeline::prelude::*;
#[doc(hidden)]
2020-09-15 19:20:20 +00:00
#[cfg(feature = "bevy_pbr")]
pub use crate::pbr::prelude::*;
#[doc(hidden)]
2020-09-15 19:20:20 +00:00
#[cfg(feature = "bevy_render")]
pub use crate::render::prelude::*;
#[doc(hidden)]
2020-09-15 19:20:20 +00:00
#[cfg(feature = "bevy_sprite")]
pub use crate::sprite::prelude::*;
#[doc(hidden)]
2020-09-15 19:20:20 +00:00
#[cfg(feature = "bevy_text")]
pub use crate::text::prelude::*;
#[doc(hidden)]
2020-09-15 19:20:20 +00:00
#[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_gilrs")]
pub use crate::gilrs::*;