Skip to content

Commit

Permalink
Update to Bevy 0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasEi committed Jul 5, 2024
1 parent aa1e159 commit c455f13
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 18 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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` |
Expand Down
16 changes: 8 additions & 8 deletions bevy_asset_loader/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_asset_loader"
version = "0.21.0-rc2.1"
version = "0.21.0"
authors = ["Niklas Eicker <git@nikl.me>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand All @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion bevy_asset_loader/examples/atlas_from_grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use bevy_asset_loader::prelude::*;
/// Requires the feature '2d'
fn main() {
App::new()
.init_state::<MyStates>()
.add_plugins(DefaultPlugins)
.init_state::<MyStates>()
.add_loading_state(
LoadingState::new(MyStates::AssetLoading)
.continue_to_state(MyStates::Next)
Expand Down
2 changes: 1 addition & 1 deletion bevy_asset_loader/examples/dynamic_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<MyStates>()
.add_plugins(DefaultPlugins)
.init_state::<MyStates>()
.add_loading_state(
LoadingState::new(MyStates::AssetLoading)
.continue_to_state(MyStates::Next)
Expand Down
2 changes: 1 addition & 1 deletion bevy_asset_loader/examples/dynamic_asset_arrays.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<MyStates>()
.add_plugins(DefaultPlugins)
.init_state::<MyStates>()
.add_loading_state(
LoadingState::new(MyStates::AssetLoading)
.continue_to_state(MyStates::Next)
Expand Down
2 changes: 1 addition & 1 deletion bevy_asset_loader/examples/failure_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use bevy_asset_loader::prelude::*;

fn main() {
App::new()
.init_state::<MyStates>()
.add_plugins(DefaultPlugins)
.init_state::<MyStates>()
.add_loading_state(
LoadingState::new(MyStates::AssetLoading)
.continue_to_state(MyStates::Next)
Expand Down
2 changes: 1 addition & 1 deletion bevy_asset_loader/examples/full_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use bevy_asset_loader::prelude::*;

fn main() {
App::new()
.init_state::<MyStates>()
.add_plugins(DefaultPlugins)
.init_state::<MyStates>()
.add_loading_state(
LoadingState::new(MyStates::AssetLoading)
.continue_to_state(MyStates::Next)
Expand Down
2 changes: 1 addition & 1 deletion bevy_asset_loader/examples/full_dynamic_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use bevy_asset_loader::prelude::*;
fn main() {
App::new()
.init_state::<MyStates>()
.add_plugins(DefaultPlugins)
.init_state::<MyStates>()
.add_loading_state(
LoadingState::new(MyStates::AssetLoading)
.continue_to_state(MyStates::Next)
Expand Down
2 changes: 1 addition & 1 deletion bevy_asset_loader/examples/manual_dynamic_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const PLAYER_SPEED: f32 = 5.;
/// load them from a file instead.
fn main() {
App::new()
.init_state::<MyStates>()
.add_plugins(DefaultPlugins)
.init_state::<MyStates>()
.add_loading_state(
LoadingState::new(MyStates::AssetLoading)
.continue_to_state(MyStates::Next)
Expand Down
2 changes: 1 addition & 1 deletion bevy_asset_loader/src/loading_state/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<S: FreelyMutableState> LoadingStateConfig<S> {
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(),
Expand Down
2 changes: 1 addition & 1 deletion bevy_asset_loader_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_asset_loader_derive"
version = "0.21.0-rc2.1"
version = "0.21.0"
authors = ["Niklas Eicker <git@nikl.me>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down

0 comments on commit c455f13

Please sign in to comment.