Fix the asset_processing example failing to compile.

This commit is contained in:
andriyDev 2024-09-27 01:11:57 -07:00
parent ad0c259044
commit 547a3df223

View file

@ -146,15 +146,15 @@ impl AssetLoader for CoolTextLoader {
let ron: CoolTextRon = ron::de::from_bytes(&bytes)?;
let mut base_text = ron.text;
for embedded in ron.embedded_dependencies {
let loaded = load_context
let complete_loaded = load_context
.loader()
.immediate()
.load::<Text>(&embedded)
.await?;
base_text.push_str(&loaded.get().0);
base_text.push_str(&complete_loaded.get_asset().get().0);
}
for (path, settings_override) in ron.dependencies_with_settings {
let loaded = load_context
let complete_loaded = load_context
.loader()
.with_settings(move |settings| {
*settings = settings_override.clone();
@ -162,7 +162,7 @@ impl AssetLoader for CoolTextLoader {
.immediate()
.load::<Text>(&path)
.await?;
base_text.push_str(&loaded.get().0);
base_text.push_str(&complete_loaded.get_asset().get().0);
}
Ok(CoolText {
text: base_text,