{"record":{"id":"3dc20711bb0b1eae","repo":"stride3d/stride","slug":"model-property-is-unset","errorCode":null,"errorMessage":"Model property is unset.","messagePattern":"Model property is unset\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/editor/Stride.Assets.Presentation/TemplateProviders/SkeletonModelPropertyTemplateProvider.cs","lineNumber":39,"sourceCode":"\n        public SkeletonProperty Property { get; set; }\n\n        public override bool MatchNode(NodeViewModel node)\n        {\n            if (!typeof(SkeletonAsset).IsAssignableFrom(node.Root.Type))\n                return false;\n\n            if (node.Parent == null)\n                return false;\n\n            switch (Property)\n            {\n                case SkeletonProperty.NodeInformation:\n                    return node.Type == typeof(NodeInformation);\n                case SkeletonProperty.NodeInformationList:\n                    return typeof(IEnumerable<NodeInformation>).IsAssignableFrom(node.Type);\n                default:\n                    throw new InvalidOperationException(\"Model property is unset.\");\n            }\n        }\n    }\n}\n","sourceCodeStart":21,"sourceCodeEnd":44,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/editor/Stride.Assets.Presentation/TemplateProviders/SkeletonModelPropertyTemplateProvider.cs#L21-L44","documentation":"SkeletonModelPropertyTemplateProvider.MatchNode switches over the SkeletonProperty enum; if the value is none of the known cases (NodeInformation / NodeInformationList), it throws InvalidOperationException because no model property was configured. It is a defensive guard against an unset or unknown enum member.","triggerScenarios":"MatchNode is invoked with a SkeletonProperty value other than NodeInformation or NodeInformationList — typically SkeletonProperty.ModelProperty (unset) or an enum value added in a newer Stride version that this provider does not handle.","commonSituations":"Skeleton bone/retargeting template configuration pointing at the default/unset SkeletonProperty member; upgrading Stride introduces new SkeletonProperty enum members not covered by this switch (no default case).","solutions":["Set the SkeletonProperty to NodeInformation or NodeInformationList in the skeleton template/configuration","Extend MatchNode's switch to handle any newly added SkeletonProperty enum members","Inspect the stack trace / property value to confirm which SkeletonProperty member is reaching the switch"],"exampleFix":"// before\ncase SkeletonProperty.NodeInformationList:\n    return typeof(IEnumerable<NodeInformation>).IsAssignableFrom(node.Type);\ndefault:\n    throw new InvalidOperationException(\"Model property is unset.\");\n// after\ncase SkeletonProperty.NodeInformationList:\n    return typeof(IEnumerable<NodeInformation>).IsAssignableFrom(node.Type);\ncase SkeletonProperty.ModelProperty:\n    return typeof(Model).IsAssignableFrom(node.Type); // handle previously-unset member","handlingStrategy":"validation","validationCode":"if (!Enum.IsDefined(typeof(SkeletonProperty), prop)) throw new InvalidOperationException($\"Unknown SkeletonProperty {prop}\");","typeGuard":"bool HasModelPropertyHandler(SkeletonProperty p) => p == SkeletonProperty.NodeInformation || p == SkeletonProperty.NodeInformationList;","tryCatchPattern":"try { MatchNode(node); }\ncatch (InvalidOperationException) { // log unsupported property and use a default matching rule\n}","preventionTips":["Handle every SkeletonProperty enum member in switches; enable warn-on-unhandled-switch","Re-check switches after Stride upgrades that add enum members","Initialize skeleton template properties explicitly instead of relying on defaults"],"tags":["stride","editor","enum"],"backgroundTag":"invalid-enum-value","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"}