mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
25f7a29a2f
# Objective After separating `bevy_states`, state installation methods like `init_state` were kept in `bevy_app` under the `bevy_state` feature flag. This is problematic, because `bevy_state` is not a core module, `bevy_app` is, yet it depends on `bevy_state`. This causes practical problems like the inability to use `bevy_hierarchy` inside `bevy_state`, because of circular dependencies. ## Solution - `bevy_state` now has a `bevy_app` feature flag, which gates the new `AppStateExt` trait. All previous state installation methods were moved to this trait. It's implemented for both `SubApp` and `App`. ## Changelog - All state related app methods are now in `AppExtStates` trait in `bevy_state`. - Added `StatesPlugin` which is in `DefaultPlugins` when `bevy_state` is enabled. ## Migration Guide `App::init_state` is now provided by the `bevy_state::app::AppExtStates;` trait: import it if you need this method and are not blob-importing the `bevy` prelude.
41 lines
1.2 KiB
TOML
41 lines
1.2 KiB
TOML
[package]
|
|
name = "bevy_app"
|
|
version = "0.14.0-dev"
|
|
edition = "2021"
|
|
description = "Provides core App functionality for Bevy Engine"
|
|
homepage = "https://bevyengine.org"
|
|
repository = "https://github.com/bevyengine/bevy"
|
|
license = "MIT OR Apache-2.0"
|
|
keywords = ["bevy"]
|
|
|
|
[features]
|
|
trace = []
|
|
bevy_debug_stepping = []
|
|
default = ["bevy_reflect"]
|
|
bevy_reflect = ["dep:bevy_reflect", "bevy_ecs/bevy_reflect"]
|
|
serialize = ["bevy_ecs/serde"]
|
|
|
|
[dependencies]
|
|
# bevy
|
|
bevy_derive = { path = "../bevy_derive", version = "0.14.0-dev" }
|
|
bevy_ecs = { path = "../bevy_ecs", version = "0.14.0-dev", default-features = false }
|
|
bevy_reflect = { path = "../bevy_reflect", version = "0.14.0-dev", optional = true }
|
|
bevy_utils = { path = "../bevy_utils", version = "0.14.0-dev" }
|
|
bevy_tasks = { path = "../bevy_tasks", version = "0.14.0-dev" }
|
|
|
|
# other
|
|
serde = { version = "1.0", features = ["derive"], optional = true }
|
|
downcast-rs = "1.2.0"
|
|
thiserror = "1.0"
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
wasm-bindgen = { version = "0.2" }
|
|
web-sys = { version = "0.3", features = ["Window"] }
|
|
console_error_panic_hook = "0.1.6"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[package.metadata.docs.rs]
|
|
rustdoc-args = ["-Zunstable-options", "--cfg", "docsrs"]
|
|
all-features = true
|