-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error handling for
AssetServer::add_async
(#13745)
# Objective The method `AssetServer::add_async` (added in #13700) requires a future that returns an `AssetLoadError` error, which was a bit of an oversight on my part, as that type of error only really makes sense in the context of bevy's own asset loader -- returning it from user-defined futures isn't very useful. ## Solution Allow passing custom error types to `add_async`, which get cast into a trait object matching the form of `AssetLoader::load`. If merged before the next release this will not be a breaking change
- Loading branch information
Showing
1 changed file
with
24 additions
and
3 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