From c455f13e40a5d4f0ef1d59206f309f55897aa1f9 Mon Sep 17 00:00:00 2001 From: Niklas Eicker Date: Fri, 5 Jul 2024 23:48:56 +0200 Subject: [PATCH] Update to Bevy 0.14 --- README.md | 3 ++- bevy_asset_loader/Cargo.toml | 16 ++++++++-------- bevy_asset_loader/examples/atlas_from_grid.rs | 2 +- bevy_asset_loader/examples/dynamic_asset.rs | 2 +- .../examples/dynamic_asset_arrays.rs | 2 +- bevy_asset_loader/examples/failure_state.rs | 2 +- bevy_asset_loader/examples/full_collection.rs | 2 +- .../examples/full_dynamic_collection.rs | 2 +- .../examples/manual_dynamic_asset.rs | 2 +- bevy_asset_loader/src/loading_state/config.rs | 2 +- bevy_asset_loader_derive/Cargo.toml | 2 +- 11 files changed, 19 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 233c04e..13e76ec 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This [Bevy][bevy] plugin reduces boilerplate for handling game assets. The crate In most cases you will want to load your asset collections during loading states (think loading screens). During such a state, all assets are loaded and their loading progress is observed. Only when asset collections can be built with fully loaded asset handles, the collections are inserted to Bevy's ECS as resources. If you do not want to use a loading state, asset collections can still result in cleaner code and improved maintainability (see the ["usage without a loading state"](#usage-without-a-loading-state) section). -_The `main` branch and the latest release support Bevy version `0.13` (see [version table](#compatible-bevy-versions))_ +_The `main` branch and the latest release support Bevy version `0.14` (see [version table](#compatible-bevy-versions))_ ## Loading states @@ -502,6 +502,7 @@ Compatibility of `bevy_asset_loader` versions: | Bevy version | `bevy_asset_loader` version | |:-------------|:----------------------------| +| `0.14` | `0.21` | | `0.13` | `0.20` | | `0.12` | `0.18` - `0.19` | | `0.11` | `0.17` | diff --git a/bevy_asset_loader/Cargo.toml b/bevy_asset_loader/Cargo.toml index 9dc07ae..b3227ed 100644 --- a/bevy_asset_loader/Cargo.toml +++ b/bevy_asset_loader/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_asset_loader" -version = "0.21.0-rc2.1" +version = "0.21.0" authors = ["Niklas Eicker "] edition = "2021" license = "MIT OR Apache-2.0" @@ -22,20 +22,20 @@ standard_dynamic_assets = ["dep:bevy_common_assets", "dep:serde"] progress_tracking = ["dep:iyes_progress"] [dependencies] -bevy = { version = "0.14.0-rc.3", default-features = false, features = ["bevy_asset", "bevy_state"] } -bevy_asset_loader_derive = { version = "=0.21.0-rc2.1", path = "../bevy_asset_loader_derive" } +bevy = { version = "0.14.0", default-features = false, features = ["bevy_asset", "bevy_state"] } +bevy_asset_loader_derive = { version = "=0.21.0", path = "../bevy_asset_loader_derive" } anyhow = "1" path-slash = "0.2" -bevy_common_assets = { version = "0.11.0-rc.3", features = ["ron"], optional = true } +bevy_common_assets = { version = "0.11.0", features = ["ron"], optional = true } serde = { version = "1", optional = true } -iyes_progress = { git = "https://github.com/NiklasEi/iyes_progress", branch = "update_bevy_main_for_0_14_cycle", optional = true } +iyes_progress = { version = "0.12.0", optional = true } [dev-dependencies] -bevy = { version = "0.14.0-rc.3", features = ["vorbis"] } +bevy = { version = "0.14.0", features = ["vorbis"] } anyhow = "1" -iyes_progress = { git = "https://github.com/NiklasEi/iyes_progress", branch = "update_bevy_main_for_0_14_cycle" } -bevy_common_assets = { version = "0.11.0-rc.3", features = ["ron"] } +iyes_progress = { version = "0.12.0" } +bevy_common_assets = { version = "0.11.0", features = ["ron"] } serde = { version = "1" } ron = "0.8.1" trybuild = { version = "1.0" } diff --git a/bevy_asset_loader/examples/atlas_from_grid.rs b/bevy_asset_loader/examples/atlas_from_grid.rs index d6a9bfa..3864f35 100644 --- a/bevy_asset_loader/examples/atlas_from_grid.rs +++ b/bevy_asset_loader/examples/atlas_from_grid.rs @@ -6,8 +6,8 @@ use bevy_asset_loader::prelude::*; /// Requires the feature '2d' fn main() { App::new() - .init_state::() .add_plugins(DefaultPlugins) + .init_state::() .add_loading_state( LoadingState::new(MyStates::AssetLoading) .continue_to_state(MyStates::Next) diff --git a/bevy_asset_loader/examples/dynamic_asset.rs b/bevy_asset_loader/examples/dynamic_asset.rs index 684a24f..e5a0096 100644 --- a/bevy_asset_loader/examples/dynamic_asset.rs +++ b/bevy_asset_loader/examples/dynamic_asset.rs @@ -6,8 +6,8 @@ use bevy_asset_loader::prelude::*; /// The assets loaded in this example are defined in `assets/dynamic_asset.assets.ron` fn main() { App::new() - .init_state::() .add_plugins(DefaultPlugins) + .init_state::() .add_loading_state( LoadingState::new(MyStates::AssetLoading) .continue_to_state(MyStates::Next) diff --git a/bevy_asset_loader/examples/dynamic_asset_arrays.rs b/bevy_asset_loader/examples/dynamic_asset_arrays.rs index 5922c04..1fde643 100644 --- a/bevy_asset_loader/examples/dynamic_asset_arrays.rs +++ b/bevy_asset_loader/examples/dynamic_asset_arrays.rs @@ -6,8 +6,8 @@ use bevy_asset_loader::prelude::*; /// The assets loaded in this example are defined in `assets/dynamic_asset_arrays.asset_arrays.ron` fn main() { App::new() - .init_state::() .add_plugins(DefaultPlugins) + .init_state::() .add_loading_state( LoadingState::new(MyStates::AssetLoading) .continue_to_state(MyStates::Next) diff --git a/bevy_asset_loader/examples/failure_state.rs b/bevy_asset_loader/examples/failure_state.rs index e7ad9f0..31e14b4 100644 --- a/bevy_asset_loader/examples/failure_state.rs +++ b/bevy_asset_loader/examples/failure_state.rs @@ -4,8 +4,8 @@ use bevy_asset_loader::prelude::*; fn main() { App::new() - .init_state::() .add_plugins(DefaultPlugins) + .init_state::() .add_loading_state( LoadingState::new(MyStates::AssetLoading) .continue_to_state(MyStates::Next) diff --git a/bevy_asset_loader/examples/full_collection.rs b/bevy_asset_loader/examples/full_collection.rs index c1f877c..b324f4c 100644 --- a/bevy_asset_loader/examples/full_collection.rs +++ b/bevy_asset_loader/examples/full_collection.rs @@ -7,8 +7,8 @@ use bevy_asset_loader::prelude::*; fn main() { App::new() - .init_state::() .add_plugins(DefaultPlugins) + .init_state::() .add_loading_state( LoadingState::new(MyStates::AssetLoading) .continue_to_state(MyStates::Next) diff --git a/bevy_asset_loader/examples/full_dynamic_collection.rs b/bevy_asset_loader/examples/full_dynamic_collection.rs index 3974904..9ee4c2e 100644 --- a/bevy_asset_loader/examples/full_dynamic_collection.rs +++ b/bevy_asset_loader/examples/full_dynamic_collection.rs @@ -11,8 +11,8 @@ use bevy_asset_loader::prelude::*; fn main() { App::new() - .init_state::() .add_plugins(DefaultPlugins) + .init_state::() .add_loading_state( LoadingState::new(MyStates::AssetLoading) .continue_to_state(MyStates::Next) diff --git a/bevy_asset_loader/examples/manual_dynamic_asset.rs b/bevy_asset_loader/examples/manual_dynamic_asset.rs index e1a46f7..50567af 100644 --- a/bevy_asset_loader/examples/manual_dynamic_asset.rs +++ b/bevy_asset_loader/examples/manual_dynamic_asset.rs @@ -7,8 +7,8 @@ const PLAYER_SPEED: f32 = 5.; /// load them from a file instead. fn main() { App::new() - .init_state::() .add_plugins(DefaultPlugins) + .init_state::() .add_loading_state( LoadingState::new(MyStates::AssetLoading) .continue_to_state(MyStates::Next) diff --git a/bevy_asset_loader/src/loading_state/config.rs b/bevy_asset_loader/src/loading_state/config.rs index 582bdda..88d47b4 100644 --- a/bevy_asset_loader/src/loading_state/config.rs +++ b/bevy_asset_loader/src/loading_state/config.rs @@ -135,7 +135,7 @@ impl LoadingStateConfig { config, ); } - for config in self.on_enter_loading_dynamic_asset_collections { + for config in self.on_enter_loading_dynamic_asset_collections.drain(..) { app.add_systems( OnEnterInternalLoadingState( self.state.clone(), diff --git a/bevy_asset_loader_derive/Cargo.toml b/bevy_asset_loader_derive/Cargo.toml index 132403e..dab1e87 100644 --- a/bevy_asset_loader_derive/Cargo.toml +++ b/bevy_asset_loader_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_asset_loader_derive" -version = "0.21.0-rc2.1" +version = "0.21.0" authors = ["Niklas Eicker "] edition = "2021" license = "MIT OR Apache-2.0"