Skip to content

Commit

Permalink
don't log an error when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Nov 13, 2023
1 parent ac2aaa3 commit 065adf3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,11 @@ impl Plugin for EmbeddedAssetPlugin {
}
#[cfg(feature = "default-source")]
PluginMode::ReplaceAndFallback { path } => {
bevy::log::error!(
"plugin EmbeddedAssetPlugin must be added before plugin AssetPlugin when replacing the default asset source"
);
if app.is_plugin_added::<AssetPlugin>() {
bevy::log::error!(
"plugin EmbeddedAssetPlugin must be added before plugin AssetPlugin when replacing the default asset source"
);
}
let path = path.clone();
app.register_asset_source(
AssetSourceId::Default,
Expand Down

0 comments on commit 065adf3

Please sign in to comment.