You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of #10514, load_untyped / load_untyped_async will defer handle creation for labeled assets until after the asset loads, as we cannot know the type ahead of time (unless it is provided manually).
This means that loading a labeled untyped asset multiple times won't always "early out" for duplicate asset loads. If a second duplicate request for a labeled untyped asset is made before the labeled asset handle is allocated in the AssetLoader, a second load of the root asset will occur.
This isn't broken, but it is suboptimal / undesirable behavior. I'm not sure we can fix this without changing how handles work.
Notably, I think moving to "assets as entities" (or an equivalent "universal id with indirection" system) resolves this problem because you no longer need to know the type to allocate an identifier. This would also allow us to "de-async-ify" untyped asset loading, which is one of the pain points people are experiencing with Bevy Asset V2.
The text was updated successfully, but these errors were encountered:
cart
added
C-Bug
An unexpected or incorrect behavior
A-Assets
Load files from disk to use for things like images, models, and sounds
labels
Nov 14, 2023
Bevy version
0.12.0
What went wrong
As of #10514, load_untyped / load_untyped_async will defer handle creation for labeled assets until after the asset loads, as we cannot know the type ahead of time (unless it is provided manually).
This means that loading a labeled untyped asset multiple times won't always "early out" for duplicate asset loads. If a second duplicate request for a labeled untyped asset is made before the labeled asset handle is allocated in the AssetLoader, a second load of the root asset will occur.
This isn't broken, but it is suboptimal / undesirable behavior. I'm not sure we can fix this without changing how handles work.
Notably, I think moving to "assets as entities" (or an equivalent "universal id with indirection" system) resolves this problem because you no longer need to know the type to allocate an identifier. This would also allow us to "de-async-ify" untyped asset loading, which is one of the pain points people are experiencing with Bevy Asset V2.
The text was updated successfully, but these errors were encountered: