FyroxEngine/Fyrox · warning

Node ( : ) and its children will be deleted, because its…

Error message

Node {} ({}:{}) and its children will be deleted, because its parent asset failed to load!

What it means

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.

Solutions

  1. Fix the missing/broken asset: restore the file at the path the scene references, or fix the path.
  2. Check load logs above this warning for the actual resource-load failure cause.
  3. Re-link the instance to a valid resource and re-instantiate.
  4. Validate all scene resource paths exist at startup before opening the scene.

Example fix

// before
// scene references "data/prefabs/enemy.toml" but file was renamed to enemy_v2.toml
// after
// update the reference or restore the file:
mv data/prefabs/enemy_v2.toml data/prefabs/enemy.toml
Defensive patterns

Strategy: fallback

Validate before calling

// verify every referenced resource loads before opening/syncing a scene
fn resources_ok(scene: &Scene) -> Vec<String> {
    scene.resource_references().filter(|p| !Path::new(p).exists()).cloned().collect()
}

Try / catch

match resource_manager.request::<Model>(path) {
    Ok(_) => sync_instance(),
    Err(e) => { log::error!("prefab failed to load: {e}; instance nodes will be dropped"); }
}

Prevention

When it happens

Trigger: 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.

Common situations: Prefab/scene file renamed, moved or deleted while a dependent scene still references it; asset path changed; resource failed to compile/parse on load.

Related errors


AI-assisted analysis of FyroxEngine/Fyrox@76c91aad8e (2026-09-10). Data as JSON: /api/errors/f640bd5608364a1b. Report an issue: GitHub.

Appendix: source

Thrown at fyrox-graph/src/lib.rs:1246

            for (_, node) in self.traverse_iter(instance_root) {
                if let Some(resource) = node.resource() {
                    if let Some(model) = resource.state().data() {
                        if !model
                            .graph()
                            .is_valid_handle(node.original_handle_in_resource())
                        {
                            nodes_to_delete.push(node.self_handle());

                            Log::warn(format!(
                                "Node {} ({}:{}) and its children will be deleted, because it \
                    does not exist in the parent asset!",
                                node.name(),
                                node.self_handle().index(),
                                node.self_handle().generation(),
                            ))
                        }
                    } else {
                        Log::warn(format!(
                            "Node {} ({}:{}) and its children will be deleted, because its \
                    parent asset failed to load!",
                            node.name(),
                            node.self_handle().index(),
                            node.self_handle().generation(),
                        ))
                    }
                }
            }

            for node_to_delete in nodes_to_delete {
                if self.is_valid_handle(node_to_delete) {
                    self.remove_node(node_to_delete);
                }
            }

            // Step 2. Look for missing nodes and create appropriate instances for them.
            let mut model = resource.state();

View on GitHub (pinned to 76c91aad8e)