{"record":{"id":"f640bd5608364a1b","repo":"FyroxEngine/Fyrox","slug":"node-and-its-children-will-be-deleted-f640bd","errorCode":null,"errorMessage":"Node {} ({}:{}) and its children will be deleted, because its parent asset failed to load!","messagePattern":"Node (.+?) \\((.+?):(.+?)\\) and its children will be deleted, because its parent asset failed to load!","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"fyrox-graph/src/lib.rs","lineNumber":1246,"sourceCode":"            for (_, node) in self.traverse_iter(instance_root) {\n                if let Some(resource) = node.resource() {\n                    if let Some(model) = resource.state().data() {\n                        if !model\n                            .graph()\n                            .is_valid_handle(node.original_handle_in_resource())\n                        {\n                            nodes_to_delete.push(node.self_handle());\n\n                            Log::warn(format!(\n                                \"Node {} ({}:{}) and its children will be deleted, because it \\\n                    does not exist in the parent asset!\",\n                                node.name(),\n                                node.self_handle().index(),\n                                node.self_handle().generation(),\n                            ))\n                        }\n                    } else {\n                        Log::warn(format!(\n                            \"Node {} ({}:{}) and its children will be deleted, because its \\\n                    parent asset failed to load!\",\n                            node.name(),\n                            node.self_handle().index(),\n                            node.self_handle().generation(),\n                        ))\n                    }\n                }\n            }\n\n            for node_to_delete in nodes_to_delete {\n                if self.is_valid_handle(node_to_delete) {\n                    self.remove_node(node_to_delete);\n                }\n            }\n\n            // Step 2. Look for missing nodes and create appropriate instances for them.\n            let mut model = resource.state();","sourceCodeStart":1228,"sourceCodeEnd":1264,"githubUrl":"https://github.com/FyroxEngine/Fyrox/blob/76c91aad8eca488ce527b1af707be8b3b24ad72d/fyrox-graph/src/lib.rs#L1228-L1264","documentation":"Also in restore_integrity: when the instance has an original-handle reference but the parent resource itself failed to load (e.g. the model file is missing or errored), there is no authoritative graph to sync against, so the node and its children are deleted with this warning.","triggerScenarios":"restore_integrity runs on a scene instance whose model resource failed to load — model data is absent, so any node with a resource reference cannot be validated and is removed.","commonSituations":"Prefab/scene file renamed, moved or deleted while a dependent scene still references it; asset path changed; resource failed to compile/parse on load.","solutions":["Fix the missing/broken asset: restore the file at the path the scene references, or fix the path.","Check load logs above this warning for the actual resource-load failure cause.","Re-link the instance to a valid resource and re-instantiate.","Validate all scene resource paths exist at startup before opening the scene."],"exampleFix":"// before\n// scene references \"data/prefabs/enemy.toml\" but file was renamed to enemy_v2.toml\n// after\n// update the reference or restore the file:\nmv data/prefabs/enemy_v2.toml data/prefabs/enemy.toml","handlingStrategy":"fallback","validationCode":"// verify every referenced resource loads before opening/syncing a scene\nfn resources_ok(scene: &Scene) -> Vec<String> {\n    scene.resource_references().filter(|p| !Path::new(p).exists()).cloned().collect()\n}","typeGuard":null,"tryCatchPattern":"match resource_manager.request::<Model>(path) {\n    Ok(_) => sync_instance(),\n    Err(e) => { log::error!(\"prefab failed to load: {e}; instance nodes will be dropped\"); }\n}","preventionTips":["Never rename/move prefab files without updating all references","Use a constant/registry of asset paths instead of string literals","Add a startup asset-integrity check for all scene dependencies","Watch resource-manager error logs before node-deletion warnings appear"],"tags":["graph","resource","load-failure","sync"],"backgroundTag":"resource-load-failed","analyzedSha":"76c91aad8eca488ce527b1af707be8b3b24ad72d","analyzedAt":"2026-09-10T16:04:01.633Z","contentChangedAt":"2026-09-10T16:04:01.633Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}