From 8a0882534815bb96327f137a2d0549bee8af217c Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 9 Mar 2024 13:15:02 -0800 Subject: [PATCH] Move AssetEvents to Last (#12389) # Objective - Fixes https://github.com/bevyengine/bevy/issues/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. --- crates/bevy_asset/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs index c5edd09e05fa3..4e579a04f2597 100644 --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -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}, @@ -380,9 +380,8 @@ impl AssetApp for App { .add_event::>() .register_type::>() .add_systems( - First, + Last, Assets::::asset_events - .before(bevy_ecs::event::event_update_system::>) .run_if(Assets::::asset_events_condition) .in_set(AssetEvents), )