FyroxEngine/Fyrox · warning
Node ( : ) instance have different type than in the…
Error message
Node {}({}:{}) instance have different type than in the respective parent asset {}. The type will be fixed. What it means
In restore_original_handles_and_inherit_properties, each instance node is compared by type_id with its corresponding resource node. If they differ (the prefab's node type was changed, e.g. a Mesh became a Sprites node or a custom node version changed), this warning is logged and the node is copied from the resource so the type is corrected.
Solutions
- No action needed if intentional: the engine auto-fixes the type by copying the resource node (overrides may be lost).
- Reapply instance-specific overrides after the fix, since the replacement resets inherited state.
- If unintentional, revert the prefab node type to match existing instances.
- Update custom node serialization when refactoring node types to keep saved scenes loadable.
Example fix
// before // prefab: base = "Mesh", instance created earlier as "Sprite" // after // align types: set prefab node base to Sprite, or delete stale instances and re-instantiate the prefab
Defensive patterns
Strategy: fallback
Validate before calling
// compare types before sync
fn type_matches(node: &Node, res_node: &Node) -> bool {
node.inner_ref().type_id() == res_node.inner_ref().type_id()
} Type guard
fn same_type(a: &dyn Reflect, b: &dyn Reflect) -> bool { a.type_id() == b.type_id() } Try / catch
if !type_matches(&node, &res_node) {
log::warn!("type differs for {}; engine will replace it; reapply overrides after sync", node.name());
} Prevention
- Avoid changing node base types in prefabs with live instances
- Apply instance overrides via inheritable properties so they survive type fixes
- Test scene load after every prefab type change
- Keep custom node types stable or provide deserialization migrations
When it happens
Trigger: A node's type in the parent asset no longer matches the instantiated node's type during scene-resource sync — typically after editing the prefab and changing node kind, or after code changes altered a custom node type.
Common situations: Developer replaces a node type in a prefab (e.g. swaps Rectangle for Sprite); refactor renames/re-types a user node class; engine version changed default node types in saved scenes.
Related errors
- Node ( : ) and its children will be deleted, because it…
- Unable to find original handle for node
- Node ( : ) and its children will be deleted, because its…
- There are multiple original nodes for
- Cast to failed!
AI-assisted analysis of FyroxEngine/Fyrox@76c91aad8e (2026-09-10).
Data as JSON: /api/errors/d5df4a71cd845c80.
Report an issue: GitHub.
Appendix: source
Thrown at fyrox-graph/src/lib.rs:1410
// Use original handle directly.
resource_graph
.try_get_node(node.original_handle_in_resource())
.map(|resource_node| {
(resource_node, node.original_handle_in_resource())
})
.ok()
}
};
if let Some((resource_node, original)) = resource_node {
node.set_original_handle_in_resource(original);
before_inherit(resource_node, node);
// Check if the actual node types (this and parent's) are equal, and if not - copy the
// node and replace its base.
if node.inner_ref().type_id() != resource_node.inner_ref().type_id() {
Log::warn(format!(
"Node {}({}:{}) instance \
have different type than in the respective parent \
asset {}. The type will be fixed.",
node.name(),
node.self_handle().index(),
node.self_handle().generation(),
model_kind
));
let base = node.base().clone();
let mut resource_node_clone = resource_node.clone();
variable::mark_inheritable_properties_non_modified(
&mut resource_node_clone as &mut dyn Reflect,
&ignored_types,
);
resource_node_clone.set_base(base);
*node = resource_node_clone;
}View on GitHub (pinned to 76c91aad8e)