{"record":{"id":"970ee0ca678f8ac7","repo":"FyroxEngine/Fyrox","slug":"unknown-widget-type-uuid-id","errorCode":null,"errorMessage":"Unknown widget type uuid {id}!","messagePattern":"Unknown widget type uuid (.+?)!","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"fyrox-ui/src/node/container.rs","lineNumber":50,"sourceCode":"/// control over instantiation process at deserialization.\n#[derive(Debug, Clone, Default, PartialEq, Reflect)]\n#[reflect(type_uuid = \"8d572e59-9594-435d-844f-c78cd7696744\")]\npub struct WidgetContainer(Option<UiNode>);\n\nfn read_widget(name: &str, visitor: &mut Visitor) -> Result<UiNode, VisitError> {\n    let mut region = visitor.enter_region(name)?;\n\n    let mut id = Uuid::default();\n    id.visit(\"TypeUuid\", &mut region)?;\n\n    let serialization_context = region\n        .blackboard\n        .get::<WidgetConstructorContainer>()\n        .expect(\"Visitor environment must contain serialization context!\");\n\n    let mut widget = serialization_context\n        .try_create(&id)\n        .ok_or_else(|| panic!(\"Unknown widget type uuid {id}!\"))\n        .unwrap();\n\n    widget.visit(\"WidgetData\", &mut region)?;\n\n    Ok(widget)\n}\n\nfn write_widget(name: &str, widget: &mut UiNode, visitor: &mut Visitor) -> VisitResult {\n    let mut region = visitor.enter_region(name)?;\n\n    let mut id = widget.id();\n    id.visit(\"TypeUuid\", &mut region)?;\n\n    widget.visit(\"WidgetData\", &mut region)?;\n\n    Ok(())\n}\n","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/FyroxEngine/Fyrox/blob/76c91aad8eca488ce527b1af707be8b3b24ad72d/fyrox-ui/src/node/container.rs#L32-L68","documentation":"During scene/widget deserialization, read_widget asks the SerializationContext to create a widget instance from the type UUID stored in the file. If the UUID is not registered (unknown widget type), there is no constructor and the visitor panics.","triggerScenarios":"Loading a UI/scene file saved with a widget type whose registration is missing: custom widget removed or renamed, a plugin not loaded, or type registration order changed between versions.","commonSituations":"Opening old scenes after deleting or renaming a custom widget; running an editor build without the plugin crate that registers custom widgets; fyrox version upgrade changing engine widget UUIDs.","solutions":["Register the missing widget type in the SerializationContext before loading (register all custom widget constructors at startup)","Re-save the scene without the unknown widget, then edit the resource file to remove the stale node","Restore/upgrade the plugin or crate that defined the widget; check version compatibility between saved assets and engine version"],"exampleFix":"// before\nlet mut ctx = SerializationContext::new();\n\n// after\nlet mut ctx = SerializationContext::new();\nctx.add::<MyCustomWidget>(MyCustomWidget::type_uuid());","handlingStrategy":"validation","validationCode":"// before loading, verify the type is registered\n// serialization_context.try_create(uuid).is_none() => refuse to load with a clear message","typeGuard":null,"tryCatchPattern":"// wrap scene loading in catch_unwind or pre-check the file's node type UUIDs against the serialization context","preventionTips":["Register every custom widget type at engine startup","Keep plugin crates loaded whenever opening their scenes","Check asset/engine version compatibility before loading old scenes"],"tags":["deserialization","uuid","widget","missing-type"],"backgroundTag":"class-not-found","analyzedSha":"76c91aad8eca488ce527b1af707be8b3b24ad72d","analyzedAt":"2026-09-10T16:04:01.633Z","contentChangedAt":"2026-09-10T16:04:01.633Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}