The logic in PR #14808 broke `bevy_asset_loader`, because calling `AssetServer::load_untyped()` initiates a load of an asset of type `LoadedUntypedAsset`, which doesn't match any asset loaders and therefore fails. I reverted the lines that were causing the problem. The resulting code seems to work, but I'm not sure if this was the correct fix.
This commit is contained in:
parent
3d0f2409d5
commit
b5eebb3e36
@ -429,12 +429,11 @@ impl AssetServer {
|
|||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
let id = handle.id().untyped();
|
let id = handle.id().untyped();
|
||||||
let owned_handle = Some(handle.clone().untyped());
|
|
||||||
|
|
||||||
let server = self.clone();
|
let server = self.clone();
|
||||||
let task = IoTaskPool::get().spawn(async move {
|
let task = IoTaskPool::get().spawn(async move {
|
||||||
let path_clone = path.clone();
|
let path_clone = path.clone();
|
||||||
match server.load_internal(owned_handle, path, false, None).await {
|
match server.load_untyped_async(path).await {
|
||||||
Ok(handle) => server.send_asset_event(InternalAssetEvent::Loaded {
|
Ok(handle) => server.send_asset_event(InternalAssetEvent::Loaded {
|
||||||
id,
|
id,
|
||||||
loaded_asset: LoadedAsset::new_with_dependencies(
|
loaded_asset: LoadedAsset::new_with_dependencies(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user