Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bevy_asset: Add
LoadContext::get_handle_untyped
(#8470)
# Objective Currently, there isn't a clean way of getting an untyped handle to an asset during asset loading. This is useful for when an asset needs to reference other assets, but may not know the concrete type of each asset. We could "hack" this together by just using some random asset: ```rust // We don't care what `bar.baz` is, so we "pretend" it's an `Image` let handle: Handle<Image> = load_context.get_handle("foo/bar.baz"); ``` This should work since we don't actually care about the underlying type in this case. However, we can do better. ## Solution Add the `LoadContext::get_handle_untyped` method to get untyped handles to assets.
- Loading branch information