File tree 2 files changed +3
-3
lines changed 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ impl Default for AssetServerSettings {
60
60
/// delegate to the default `AssetIo` for the platform.
61
61
pub fn create_platform_default_asset_io ( app : & mut App ) -> Box < dyn AssetIo > {
62
62
let settings = app
63
- . world
64
- . get_resource_or_insert_with ( AssetServerSettings :: default ) ;
63
+ . consume_initialization_resource :: < AssetServerSettings > ( )
64
+ . unwrap_or_default ( ) ;
65
65
66
66
#[ cfg( all( not( target_arch = "wasm32" ) , not( target_os = "android" ) ) ) ]
67
67
let source = FileAssetIo :: new ( & settings. asset_folder ) ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use bevy::{
7
7
8
8
fn main ( ) {
9
9
App :: new ( )
10
- . insert_resource ( AssetServerSettings {
10
+ . insert_initialization_resource ( AssetServerSettings {
11
11
asset_folder : "/" . to_string ( ) ,
12
12
} )
13
13
. add_plugins ( DefaultPlugins )
You can’t perform that action at this time.
0 commit comments