bevy
bevy copied to clipboard
auto create imported asset folder if needed
Objective
- Since #11218, example
asset_processingfails:
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 https://github.com/bevyengine/bevy/blob/a6574786757c0a0a7ddffb99fdc40ce90980fc82/.gitignore#L18
Solution
- Auto create the
imported_assetsfolder if it is configured
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
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