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:
Rob Parrett 2022-08-29 22:26:43 +00:00
parent f62bdc3590
commit adf2475dab

View file

@ -52,6 +52,7 @@ impl AssetIo for WasmAssetIo {
&self,
_path: &Path,
) -> Result<Box<dyn Iterator<Item = PathBuf>>, AssetIoError> {
bevy_log::warn!("Loading folders is not supported in WASM");
Ok(Box::new(std::iter::empty::<PathBuf>()))
}