Skip to content

Add are_dependencies_loaded and are_direct_dependencies_loaded to AssetServer.#23910

Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom
andriyDev:res-loaded
Apr 21, 2026
Merged

Add are_dependencies_loaded and are_direct_dependencies_loaded to AssetServer.#23910
alice-i-cecile merged 1 commit intobevyengine:mainfrom
andriyDev:res-loaded

Conversation

@andriyDev
Copy link
Copy Markdown
Contributor

Objective

  • It's currently very painful to deal with resources holding handles. You can't just poll if its assets are loaded.

Solution

  • Add a simple function to just poll every dependency of a VisitAssetDependencies.
  • Since we can now derive VisitAssetDependencies on stuff, we can now just pass a resource to these functions and find out if they are loaded.

Testing

  • Added a basic test.

@andriyDev andriyDev added C-Feature A new feature, making something new possible A-Assets Load files from disk to use for things like images, models, and sounds D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 21, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Assets Apr 21, 2026
Copy link
Copy Markdown
Contributor

@ChristopherBiscardi ChristopherBiscardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lovely helpers that will be great for collections

@alice-i-cecile alice-i-cecile added the X-Uncontroversial This work is generally agreed upon label Apr 21, 2026
@alice-i-cecile alice-i-cecile 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 Apr 21, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 21, 2026
Merged via the queue into bevyengine:main with commit 5c4bc21 Apr 21, 2026
51 checks passed
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in Assets Apr 21, 2026
@andriyDev andriyDev deleted the res-loaded branch April 21, 2026 05:46
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-Feature A new feature, making something new possible D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants