forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…evyengine#15481) # Objective Fixes bevyengine#15417. ## Solution - Remove the `labeled_assets` fields from `LoadedAsset` and `ErasedLoadedAsset`. - Created new structs `CompleteLoadedAsset` and `CompleteErasedLoadedAsset` to hold the `labeled_subassets`. - When a subasset is `LoadContext::finish`ed, it produces a `CompleteLoadedAsset`. - When a `CompleteLoadedAsset` is added to a `LoadContext` (as a subasset), their `labeled_assets` are merged, reporting any overlaps. One important detail to note: nested subassets with overlapping names could in theory have been used in the past for the purposes of asset preprocessing. Even though there was no way to access these "shadowed" nested subassets, asset preprocessing does get access to these nested subassets. This does not seem like a case we should support though. It is confusing at best. ## Testing - This is just a refactor. --- ## Migration Guide - Most uses of `LoadedAsset` and `ErasedLoadedAsset` should be replaced with `CompleteLoadedAsset` and `CompleteErasedLoadedAsset` respectively.
- Loading branch information
Showing
10 changed files
with
173 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.