@@ -47,8 +47,8 @@ pub use loader::*;
47
47
pub use path:: * ;
48
48
pub use reflect:: * ;
49
49
50
- use bevy_app:: { prelude:: * , UpdateFlowOrder } ;
51
- use bevy_ecs:: schedule:: ScheduleLabel ;
50
+ use bevy_app:: prelude:: * ;
51
+ use bevy_ecs:: { schedule:: ScheduleLabel , world :: World } ;
52
52
use bevy_utils:: Duration ;
53
53
54
54
/// Asset storages are updated.
@@ -132,7 +132,6 @@ impl Plugin for AssetPlugin {
132
132
app. register_type :: < HandleId > ( ) ;
133
133
app. register_type :: < AssetPath > ( ) ;
134
134
135
- app. add_systems ( PreUpdate , asset_server:: free_unused_assets_system) ;
136
135
app. init_schedule ( LoadAssets ) ;
137
136
app. init_schedule ( AssetEvents ) ;
138
137
@@ -141,9 +140,10 @@ impl Plugin for AssetPlugin {
141
140
all( not( target_arch = "wasm32" ) , not( target_os = "android" ) )
142
141
) ) ]
143
142
app. add_systems ( LoadAssets , io:: filesystem_watcher_system) ;
144
-
145
- let mut order = app. world . resource_mut :: < UpdateFlowOrder > ( ) ;
146
- order. insert_after ( First , LoadAssets ) ;
147
- order. insert_after ( PostUpdate , AssetEvents ) ;
143
+ app. add_systems ( LoadAssets , asset_server:: free_unused_assets_system) ;
144
+ app. add_systems ( FrameReady , |world : & mut World | {
145
+ world. run_schedule ( LoadAssets ) ;
146
+ world. run_schedule ( AssetEvents ) ;
147
+ } ) ;
148
148
}
149
149
}
0 commit comments