Add a warning when watch_for_changes has no effect (#3684)
# Objective - Users can get confused when they ask for watching to be unsupported, then find it isn't supported - Fixes https://github.com/bevyengine/bevy/issues/3683 ## Solution - Add a warning if the `watch_for_changes` call would do nothing
This commit is contained in:
parent
f1f6fd349a
commit
f3de12bc5e
@ -42,6 +42,7 @@ impl AssetIo for AndroidAssetIo {
|
||||
}
|
||||
|
||||
fn watch_for_changes(&self) -> Result<(), AssetIoError> {
|
||||
bevy_log::warn!("Watching for changes is not supported on Android");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@ -104,6 +104,8 @@ impl AssetIo for FileAssetIo {
|
||||
{
|
||||
*self.filesystem_watcher.write() = Some(FilesystemWatcher::default());
|
||||
}
|
||||
#[cfg(not(feature = "filesystem_watcher"))]
|
||||
bevy_log::warn!("Watching for changes is not supported when the `filesystem_watcher` feature is disabled");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -46,6 +46,7 @@ impl AssetIo for WasmAssetIo {
|
||||
}
|
||||
|
||||
fn watch_for_changes(&self) -> Result<(), AssetIoError> {
|
||||
bevy_log::warn!("Watching for changes is not supported in WASM");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user