{"record":{"id":"69412505520cf4a2","repo":"bevyengine/bevy","slug":"the-scene-scenelist-is-not-present-on-the-scene-as","errorCode":null,"errorMessage":"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","messagePattern":"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","errorType":"exception","errorClass":"ResolveSceneError","httpStatus":null,"severity":"error","filePath":"crates/bevy_scene/src/scene.rs","lineNumber":164,"sourceCode":"/// An asset dependency of a [`Scene`].\npub struct SceneDependency {\n    /// The path of the asset.\n    pub path: AssetPath<'static>,\n    /// The type of the asset.\n    pub type_id: TypeId,\n}\n\n/// An [`Error`] that occurs during [`Scene::resolve`].\n#[derive(Error, Debug)]\npub enum ResolveSceneError {\n    /// Caused when a dependency listed in [`Scene::register_dependencies`] is not available when calling [`Scene::resolve`]\n    #[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.\")]\n    MissingSceneDependency(AssetPath<'static>),\n    /// Caused when including a cached scene during [`Scene::resolve`] fails.\n    #[error(transparent)]\n    CachedSceneError(#[from] CachedSceneError),\n    /// Caused when a [`Scene`]/[`SceneList`] is not present on the scene asset.\n    #[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\")]\n    MissingScene,\n}\n\n/// Context used by [`Scene`] implementations during [`Scene::resolve`].\npub struct ResolveContext<'a> {\n    /// The current asset server\n    pub assets: &'a AssetServer,\n    /// The current [`ScenePatch`] asset collection\n    pub patches: &'a Assets<ScenePatch>,\n    /// The currently cached [`ScenePatch`], if there is one.\n    pub cached: Option<&'a ScenePatch>,\n}\n\nmacro_rules! scene_impl {\n    ($($patch: ident),*) => {\n        impl<$($patch: Scene),*> Scene for ($($patch,)*) {\n            fn resolve(self, _context: &mut ResolveContext, _scene: &mut ResolvedScene) -> Result<(), ResolveSceneError> {\n                #[expect(","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_scene/src/scene.rs#L146-L182","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nif deps_loaded { patch.resolve(&server, &patches)?; }\nspawn_system: patch.resolve(&server, &patches)?; // second call -> MissingScene\n\n// after\nif patch.resolved.is_none() && deps_loaded {\n    patch.resolve(&server, &patches)?;\n}","handlingStrategy":"validation","validationCode":"if patch.resolved.is_none() {\n    patch.resolve(&server, &patches)?; // only first call consumes the source scene\n}","typeGuard":null,"tryCatchPattern":"match patch.resolve(&server, &patches) {\n    Err(ResolveSceneError::MissingScene) => {\n        // already resolved — use patch.resolved instead of resolving again\n    }\n    r => r?,\n}","preventionTips":["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"],"tags":["bevy","scene","state","double-use","runtime"],"backgroundTag":"resource-already-consumed","analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}