Asset Server incorrectly parsing files with # in their name
Bevy version
0.13
What you did
- Created a file
assets/A#.ron - Attempted to load this file with bevy
What went wrong
Loading fails, the AssetServer returns LoadState::Failed for the relevant handle. The server appears to be attempting to load file "A" with a "#.ron" label.
Additional information
Based on this issue, I discovered that we can first convert the file to a Path:
asset_server.load("A#.ron") // fails
asset_server.load(Path::new("A#.ron")) // works
asset_server.load(Path::new("foo.gltf#Scene0")) // fails
However this is not a great solution, IMO ideally these could be unified in some way and a better method for handling the delimiter found.
Would it be comfortable to do it via tuple like asset_server.load((Path::new("A#.ron"), "Scene0")) ?
@thebluefish there is a way to set path with hash and subasset at same time explicitly with code like this
asset_server.load(AssetPath::from_path(Path::new("A#.ron")).with_label("Scene0"));