Skip to content

Fix a NestedLoader code path that failed to use its meta transform #19117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

greeble-dev
Copy link
Contributor

@greeble-dev greeble-dev commented May 7, 2025

Solution

While poking around NestedLoader I happened to notice that one code path failed to pass on the loader's meta transform.

- .get_or_create_path_handle(path, None)
+ .get_or_create_path_handle(path, self.meta_transform)

This seems like a simple oversight - everything else that can pass on the meta transform does so - although I'm not familiar enough with the asset system to be 100% sure. It was introduced when asset loaders were changed to use the builder pattern (#13465).

Unfortunately I couldn't find a case that actually hits this code path. So I don't have a good test case, and I don't know if any users have experienced it as a bug.

Testing

cargo test -p bevy_asset

Also tested various examples - testbed_2d, testbed_3d and everything in examples/asset.

@greeble-dev greeble-dev added C-Bug An unexpected or incorrect behavior 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 May 7, 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-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants