diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs index 66af7f0216..291e18b43b 100644 --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -47,6 +47,7 @@ use bevy_ecs::{ schedule::{IntoSystemConfigs, IntoSystemSetConfigs, ScheduleLabel, SystemSet}, world::FromWorld, }; +use bevy_log::error; use bevy_reflect::{FromReflect, GetTypeRegistration, Reflect, TypePath}; use std::{any::TypeId, sync::Arc}; @@ -349,6 +350,11 @@ impl AssetApp for App { id: impl Into>, source: AssetSourceBuilder, ) -> &mut Self { + let id = id.into(); + if self.world.get_resource::().is_some() { + error!("{} must be registered before `AssetPlugin` (typically added as part of `DefaultPlugins`)", id); + } + { let mut sources = self .world