Skip to content

Commit

Permalink
Move AssetEvents to Last (#12389)
Browse files Browse the repository at this point in the history
# Objective

- Fixes #12380

## Solution

- Before #11986 AssetEvents were scheduled after PostUpdate. That pr
moved these into First. This PR moves them into Last which is closer to
how they were scheduled before.
  • Loading branch information
hymm committed Mar 9, 2024
1 parent 8e467f4 commit 8a08825
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/bevy_asset/src/lib.rs
Expand Up @@ -49,7 +49,7 @@ use crate::{
io::{embedded::EmbeddedAssetRegistry, AssetSourceBuilder, AssetSourceBuilders, AssetSourceId},
processor::{AssetProcessor, Process},
};
use bevy_app::{App, First, Plugin, PreUpdate};
use bevy_app::{App, Last, Plugin, PreUpdate};
use bevy_ecs::{
reflect::AppTypeRegistry,
schedule::{IntoSystemConfigs, IntoSystemSetConfigs, SystemSet},
Expand Down Expand Up @@ -380,9 +380,8 @@ impl AssetApp for App {
.add_event::<AssetLoadFailedEvent<A>>()
.register_type::<Handle<A>>()
.add_systems(
First,
Last,
Assets::<A>::asset_events
.before(bevy_ecs::event::event_update_system::<AssetEvent<A>>)
.run_if(Assets::<A>::asset_events_condition)
.in_set(AssetEvents),
)
Expand Down

0 comments on commit 8a08825

Please sign in to comment.