Skip to content

Support for get_many and get_many_mut functions for Assets<T>#16334

Closed
Rajveer100 wants to merge 1 commit into
bevyengine:mainfrom
Rajveer100:assets-get-many
Closed

Support for get_many and get_many_mut functions for Assets<T>#16334
Rajveer100 wants to merge 1 commit into
bevyengine:mainfrom
Rajveer100:assets-get-many

Conversation

@Rajveer100

Copy link
Copy Markdown
Contributor

Part of #16244

Objective

Add functions for Assets<T> to retrieve multiple references similar to Query<...>

Solution

The Query type has the get_many and get_many_mut methods to get around this limitation, allowing multiple Entities to be looked up at once, with a dynamic check to prevent the same entity from being accessed multiple times. A similar pattern can be followed here.

@Rajveer100

Copy link
Copy Markdown
Contributor Author

For retrieving mutable references, what do you think is an appropriate way?

@BenjaminBrienen BenjaminBrienen 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-Help The author needs help finishing this PR. labels Nov 10, 2024
@Wuketuke Wuketuke mentioned this pull request Jun 3, 2025
@Rajveer100

Copy link
Copy Markdown
Contributor Author

Closing this in favor of #19484

@Rajveer100 Rajveer100 closed this Sep 3, 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-Feature A new feature, making something new possible D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Help The author needs help finishing this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants