FyroxEngine/Fyrox · error
Unknown widget type uuid
Error message
Unknown widget type uuid {id}! What it means
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.
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
Example fix
// before let mut ctx = SerializationContext::new(); // after let mut ctx = SerializationContext::new(); ctx.add::<MyCustomWidget>(MyCustomWidget::type_uuid());
Defensive patterns
Strategy: validation
Validate before calling
// before loading, verify the type is registered // serialization_context.try_create(uuid).is_none() => refuse to load with a clear message
Try / catch
// wrap scene loading in catch_unwind or pre-check the file's node type UUIDs against the serialization context
Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Animation pool must be empty on load!
- Failed to load brush tool data due to
- Resource manager must be available when deserializing…
- Unable to get a resource of type
- Unable to get a resource of type
AI-assisted analysis of FyroxEngine/Fyrox@76c91aad8e (2026-09-10).
Data as JSON: /api/errors/970ee0ca678f8ac7.
Report an issue: GitHub.
Appendix: source
Thrown at fyrox-ui/src/node/container.rs:50
/// control over instantiation process at deserialization.
#[derive(Debug, Clone, Default, PartialEq, Reflect)]
#[reflect(type_uuid = "8d572e59-9594-435d-844f-c78cd7696744")]
pub struct WidgetContainer(Option<UiNode>);
fn read_widget(name: &str, visitor: &mut Visitor) -> Result<UiNode, VisitError> {
let mut region = visitor.enter_region(name)?;
let mut id = Uuid::default();
id.visit("TypeUuid", &mut region)?;
let serialization_context = region
.blackboard
.get::<WidgetConstructorContainer>()
.expect("Visitor environment must contain serialization context!");
let mut widget = serialization_context
.try_create(&id)
.ok_or_else(|| panic!("Unknown widget type uuid {id}!"))
.unwrap();
widget.visit("WidgetData", &mut region)?;
Ok(widget)
}
fn write_widget(name: &str, widget: &mut UiNode, visitor: &mut Visitor) -> VisitResult {
let mut region = visitor.enter_region(name)?;
let mut id = widget.id();
id.visit("TypeUuid", &mut region)?;
widget.visit("WidgetData", &mut region)?;
Ok(())
}
View on GitHub (pinned to 76c91aad8e)