bevy/crates/bevy_asset
Carter Anderson 749f3d7430
Fix untyped labeled asset loading (#10514)
# Objective

Fixes #10436
Alternative to #10465 

## Solution

`load_untyped_async` / `load_internal` currently has a bug. In
`load_untyped_async`, we pass None into `load_internal` for the
`UntypedHandle` of the labeled asset path. This results in a call to
`get_or_create_path_handle_untyped` with `loader.asset_type_id()`
This is a new code path that wasn't hit prior to the newly added
`load_untyped` because `load_untyped_async` was a private method only
used in the context of the `load_folder` impl (which doesn't have
labels)

The fix required some refactoring to catch that case and defer handle
retrieval. I have also made `load_untyped_async` public as it is now
"ready for public use" and unlocks new scenarios.
2023-11-14 02:41:10 +00:00
..
macros Release 0.12 (#10362) 2023-11-04 17:24:23 +00:00
src Fix untyped labeled asset loading (#10514) 2023-11-14 02:41:10 +00:00
Cargo.toml Release 0.12 (#10362) 2023-11-04 17:24:23 +00:00