Skip to content
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

auto create imported asset folder if needed #11284

Merged
merged 3 commits into from
Jan 21, 2024

Conversation

mockersf
Copy link
Member

Objective

thread 'main' panicked at crates/bevy_asset/src/io/source.rs:489:18:
Failed to create file watcher: Error { kind: PathNotFound, paths: ["examples/asset/processing/imported_assets/Default"] }

start from a fresh git clone or delete the folder before running to reproduce, it is in gitignore and should not be present on a fresh run

imported_assets

Solution

  • Auto create the imported_assets folder if it is configured

@mockersf mockersf added the A-Assets Load files from disk to use for things like images, models, and sounds label Jan 10, 2024
crates/bevy_asset/src/io/file/mod.rs Outdated Show resolved Hide resolved
crates/bevy_asset/src/io/source.rs Outdated Show resolved Hide resolved
@mockersf
Copy link
Member Author

In other words, instead of what was done previously, where file system control was given to the reader, should it be given to the writer instead?

That would result in the same situation as before #11218, and the assets folder created when not needed

@TheoDulka
Copy link

Ahhh yeah of course, somehow misunderstood FileAssetWriter::new to be the file initializer, instead of it setting the base path of the writer, so it would end up creating the assets folder. I'll delete the question

@alice-i-cecile alice-i-cecile added the C-Bug An unexpected or incorrect behavior label Jan 10, 2024
@alice-i-cecile alice-i-cecile added this to the 0.13 milestone Jan 10, 2024
Copy link
Contributor

@nvdaz nvdaz left a comment

Choose a reason for hiding this comment

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

Tried it and looks good.

Asset processing ideally shouldn't need file_watcher to work (so it's portable), but that's a separate issue.

crates/bevy_asset/src/io/file/mod.rs Outdated Show resolved Hide resolved
@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jan 18, 2024
@mockersf mockersf added this pull request to the merge queue Jan 21, 2024
Merged via the queue into bevyengine:main with commit 259fb68 Jan 21, 2024
23 checks passed
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 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.

5 participants