Skip to content

Conversation

@andriyDev
Copy link
Contributor

@andriyDev andriyDev commented Nov 16, 2025

Objective

Solution

  • Propagate loading dependencies to immediate asset loads.
  • I also deduped some test App setup code.

Testing

  • Added a test.

One case that does have a slightly undesirable effect is when you immediately-load an asset, take some data from it (but no dependency handles), and then drop the immediately-loaded asset. This change will now also initiate a dependency load, even though we won't use it.

However, A) it is much more surprising to have a handle that will never be loaded, B) we should end up cancelling the dependency load once we drop the handle, so we shouldn't pay too much of the cost of loading.

@andriyDev andriyDev added C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy A-Assets Load files from disk to use for things like images, models, and sounds S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Nov 16, 2025
@andriyDev andriyDev added this to the 0.18 milestone Nov 16, 2025
@andriyDev andriyDev force-pushed the immediate-transitive branch from 6aab25a to 0d02a73 Compare November 16, 2025 22:07
@andriyDev andriyDev force-pushed the immediate-transitive branch from 0d02a73 to 5ad736b Compare November 16, 2025 22:07
@andriyDev andriyDev added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dependencies of immediately loaded nested asset never start loading.

2 participants