-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - Add warning when using load_folder on web #5827
Conversation
@@ -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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep in line with the name of the method
bevy_log::warn!("Loading folders is not supported in WASM"); | |
bevy_log::warn!("Reading a directory is not supported in WASM"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that this phrasing would be more useful to normal users who would see this message when attempting to use load_folder
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I guess that makes sense then since it's probably going to be the more common use case
bors r+ |
# 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`.
Pull request successfully merged into main. Build succeeded: |
# 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`.
# 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`.
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 theWasmAssetIo
.This is extremely similar to the warning already emitted a few lines below for
watch_for_changes
.