{"record":{"id":"d02da65b8b8cd31b","repo":"stride3d/stride","slug":"no-assetpropertygraph-type-matching-the-given-asset-type-has","errorCode":null,"errorMessage":"No AssetPropertyGraph type matching the given asset type has been found","messagePattern":"No AssetPropertyGraph type matching the given asset type has been found","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/assets/Stride.Core.Assets.Quantum/AssetQuantumRegistry.cs","lineNumber":101,"sourceCode":"                    NodeGraphDefinitions.Add(attribute.AssetType, definition);\n                }\n            }\n        }\n    }\n\n    public static AssetPropertyGraph ConstructPropertyGraph(AssetPropertyGraphContainer container, AssetItem assetItem, ILogger? logger)\n    {\n        var assetType = assetItem.Asset.GetType();\n        while (assetType is not null)\n        {\n            var typeToTest = assetType.IsGenericType ? assetType.GetGenericTypeDefinition() : assetType;\n            if (NodeGraphTypes.TryGetValue(typeToTest, out var propertyGraphType))\n            {\n                return (AssetPropertyGraph)Activator.CreateInstance(propertyGraphType, container, assetItem, logger)!;\n            }\n            assetType = assetType.BaseType;\n        }\n        throw new InvalidOperationException(\"No AssetPropertyGraph type matching the given asset type has been found\");\n    }\n\n    public static AssetPropertyGraphDefinition GetDefinition(Type assetType)\n    {\n        if (!typeof(Asset).IsAssignableFrom(assetType))\n            throw new ArgumentException($\"The type {assetType.Name} is not an asset type\");\n\n        var currentType = assetType;\n        while (currentType is not null && currentType != typeof(Asset))\n        {\n            // ReSharper disable once AssignNullToNotNullAttribute - cannot happen\n            if (NodeGraphDefinitions.TryGetValue(currentType, out var definition))\n            {\n                // Register the instance for this specific type so we don't have to do this again next time.\n                if (currentType != assetType)\n                {\n                    NodeGraphDefinitions.Add(assetType, definition);\n                }","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/assets/Stride.Core.Assets.Quantum/AssetQuantumRegistry.cs#L83-L119","documentation":"AssetQuantumRegistry.ConstructPropertyGraph walked the asset type's inheritance chain (including generic type definitions) and found no registered AssetPropertyGraph type. The asset class and none of its bases carry an AssetPropertyGraphAttribute, so no property graph can be constructed for it.","triggerScenarios":"Thrown at sources/assets/Stride.Core.Assets.Quantum/AssetQuantumRegistry.cs:101 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add an AssetPropertyGraphAttribute to the asset type (or a base type) pointing at a suitable AssetPropertyGraph subclass","Verify the assembly containing the attribute-decorated graph was registered with AssetQuantumRegistry.RegisterAssembly","For generic assets, ensure the generic type definition is registered"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}