mirror of
https://github.com/bevyengine/bevy
synced 2025-02-16 22:18:33 +00:00
Add warning when using load_folder on web (#5827)
# Objective Help users who are using `load_folder` in wasm builds to find a slightly shorter path to figuring out why their stuff is broken. ## Solution Adds a warning to `read_directory` in the `WasmAssetIo`. This is extremely similar to the warning already emitted a few lines below for `watch_for_changes`.
This commit is contained in:
parent
f62bdc3590
commit
adf2475dab
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ impl AssetIo for WasmAssetIo {
|
||||||
&self,
|
&self,
|
||||||
_path: &Path,
|
_path: &Path,
|
||||||
) -> Result<Box<dyn Iterator<Item = PathBuf>>, AssetIoError> {
|
) -> Result<Box<dyn Iterator<Item = PathBuf>>, AssetIoError> {
|
||||||
|
bevy_log::warn!("Loading folders is not supported in WASM");
|
||||||
Ok(Box::new(std::iter::empty::<PathBuf>()))
|
Ok(Box::new(std::iter::empty::<PathBuf>()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue