bevyengine/bevy · error · ResolveSceneError
The Scene/SceneList is not present on the scene asset. This
Error message
The Scene/SceneList is not present on the scene asset. This is likely because the scene has already been resolved, which consumed the source scene
What it means
Variant of ResolveSceneError. ScenePatch/SceneListPatch store their source scene in an Option that ScenePatch::resolve takes via Option::take — resolution consumes the source. If you call resolve a second time, the Option is None and MissingScene is returned. This is a one-shot API by design.
Source
Thrown at crates/bevy_scene/src/scene.rs:164
/// An asset dependency of a [`Scene`].
pub struct SceneDependency {
/// The path of the asset.
pub path: AssetPath<'static>,
/// The type of the asset.
pub type_id: TypeId,
}
/// An [`Error`] that occurs during [`Scene::resolve`].
#[derive(Error, Debug)]
pub enum ResolveSceneError {
/// Caused when a dependency listed in [`Scene::register_dependencies`] is not available when calling [`Scene::resolve`]
#[error("Cannot resolve scene because the asset dependency {0} is not present. This could be because it isn't loaded yet, or because the asset does not exist. Consider using `queue_spawn_scene()` if you would like to wait for scene dependencies before spawning.")]
MissingSceneDependency(AssetPath<'static>),
/// Caused when including a cached scene during [`Scene::resolve`] fails.
#[error(transparent)]
CachedSceneError(#[from] CachedSceneError),
/// Caused when a [`Scene`]/[`SceneList`] is not present on the scene asset.
#[error("The Scene/SceneList is not present on the scene asset. This is likely because the scene has already been resolved, which consumed the source scene")]
MissingScene,
}
/// Context used by [`Scene`] implementations during [`Scene::resolve`].
pub struct ResolveContext<'a> {
/// The current asset server
pub assets: &'a AssetServer,
/// The current [`ScenePatch`] asset collection
pub patches: &'a Assets<ScenePatch>,
/// The currently cached [`ScenePatch`], if there is one.
pub cached: Option<&'a ScenePatch>,
}
macro_rules! scene_impl {
($($patch: ident),*) => {
impl<$($patch: Scene),*> Scene for ($($patch,)*) {
fn resolve(self, _context: &mut ResolveContext, _scene: &mut ResolvedScene) -> Result<(), ResolveSceneError> {
#[expect(View on GitHub (pinned to 396ca72708)
Solutions
- Resolve each ScenePatch exactly once; check patch.resolved.is_some() (or scene_list.is_none()) before calling resolve
- If you need to resolve again, re-load or re-add a fresh ScenePatch instead
- Remove duplicate resolve calls — let queue_spawn_scene's flow own resolution
Example fix
// before
if deps_loaded { patch.resolve(&server, &patches)?; }
spawn_system: patch.resolve(&server, &patches)?; // second call -> MissingScene
// after
if patch.resolved.is_none() && deps_loaded {
patch.resolve(&server, &patches)?;
} Defensive patterns
Strategy: validation
Validate before calling
if patch.resolved.is_none() {
patch.resolve(&server, &patches)?; // only first call consumes the source scene
} Try / catch
match patch.resolve(&server, &patches) {
Err(ResolveSceneError::MissingScene) => {
// already resolved — use patch.resolved instead of resolving again
}
r => r?,
} Prevention
- Resolve is one-shot: check patch.resolved.is_some() before calling it
- Let a single system (or queue_spawn_scene) own resolution; never duplicate resolve calls
When it happens
Trigger: Calling patch.resolve(...) twice on the same ScenePatch or SceneListPatch asset; resolving a patch that was already resolved by another system or by the built-in queue_spawn_scene flow.
Common situations: Two systems both trying to resolve the same loaded scene asset; retry loops that re-resolve after failure; adding a manual resolve alongside the automatic queue_spawn_scene machinery.
Related errors
- Attempted to include a second cached scene (id {id:?}, path:
- Attempted to include cached scene (id {id:?}, path: {path:?}
- Failed to build a Template in the current Scene: {0}
- Couldn't create an instance of `{name}` using the reflected
- Invalid knots: all knots are equal
AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20).
Data as JSON: /api/errors/69412505520cf4a2.
Report an issue: GitHub.