Skip to content

Commit 1a30557

Browse files
committed
Fix the load_embedded_asset macro to use the non-deprecated load_with_settings.
1 parent da75ab8 commit 1a30557

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • crates/bevy_asset/src/io/embedded

crates/bevy_asset/src/io/embedded/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,9 @@ impl GetAssetServer for AssetServer {
172172
/// This macro takes two arguments and an optional third one:
173173
/// 1. The asset source. It may be `AssetServer`, `World` or `App`.
174174
/// 2. The path to the asset to embed, as a string literal.
175-
/// 3. Optionally, a closure of the same type as in [`AssetServer::load_with_settings`].
176-
/// Consider explicitly typing the closure argument in case of type error.
175+
/// 3. Optionally, a closure of the same type as in
176+
/// [`LoadBuilder::with_settings`](crate::LoadBuilder::with_settings). Consider explicitly typing
177+
/// the closure argument in case of type error.
177178
///
178179
/// # Usage
179180
///
@@ -196,7 +197,7 @@ macro_rules! load_embedded_asset {
196197
}};
197198
($provider: expr, $path: literal, $settings: expr) => {{
198199
let (path, asset_server) = $crate::load_embedded_asset!(@get: $path, $provider);
199-
asset_server.load_with_settings(path, $settings)
200+
asset_server.load_builder().with_settings($settings).load(path)
200201
}};
201202
($provider: expr, $path: literal) => {{
202203
let (path, asset_server) = $crate::load_embedded_asset!(@get: $path, $provider);

0 commit comments

Comments
 (0)