bevyengine / bevyengine/bevy

More ergonomic asset loading to avoid "check if asset is loaded" boilerplate

Open
#1,701 20 comments 9 reactions 0 assignees View on GitHub
A-Assets A-States C-Usability S-Needs-Design-Doc
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

Assets need to be loaded before they can be delayed. However, with good reason, the asset loader does not block. In order to deal with this, you either need to wait until all of the assets are loaded or handle the possibility that your assets might not exist.

## What solution would you like?

Bevy has a first-class built-in solution with minimal boilerplate. The state solution seems like a nice building block, but I'm not sure exactly what the correct API should be.

## What alternative(s) have you considered?

State solution from [examples](https://github.com/bevyengine/bevy/blob/main/examples/2d/texture_atlas.rs#L39).

Resource solution from [cheatbook](https://bevy-cheatbook.github.io/cookbook/assets-ready.html).

Both of these require a great deal of complex boilerplate.

## Additional context

Async systems (#1393) might be the tool to solve this. Distill integration (#708) might also solve this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.