{"record":{"id":"8fd8e731fd180205","repo":"stride3d/stride","slug":"invalid-collider-shape-description","errorCode":null,"errorMessage":"Invalid collider shape description","messagePattern":"Invalid collider shape description","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Navigation/NavigationMeshBuilder.cs","lineNumber":677,"sourceCode":"                vertices[i] = new VertexPositionNormalTexture(planePoints[i] + planeOffset, Vector3.UnitY, Vector2.Zero);\n            }\n\n            GeometricMeshData<VertexPositionNormalTexture> meshData = new GeometricMeshData<VertexPositionNormalTexture>(vertices, planeInds, true);\n\n            NavigationMeshInputBuilder inputBuilder = new NavigationMeshInputBuilder();\n            inputBuilder.AppendMeshData(meshData, Matrix.Identity);\n            return inputBuilder;\n        }\n\n        /// <summary>\n        /// Extract the collider shape description in the case of it being either an inline shape or an asset as shape\n        /// </summary>\n        private TColliderType GetColliderShapeDesc<TColliderType>(IColliderShapeDesc desc) where TColliderType : class, IColliderShapeDesc\n        {\n            if (desc is TColliderType direct)\n                return direct;\n            if (desc is not ColliderShapeAssetDesc asset)\n                throw new Exception(\"Invalid collider shape description\");\n            return asset.Shape.Descriptions.First() as TColliderType;\n        }\n    }\n}\n","sourceCodeStart":659,"sourceCodeEnd":682,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Navigation/NavigationMeshBuilder.cs#L659-L682","documentation":"Thrown by NavigationMeshBuilder's private GetColliderShapeDesc<T> when a collider shape description is neither the requested descriptor type nor a ColliderShapeAssetDesc whose asset exposes a matching descriptor. The builder cannot resolve a usable shape descriptor for navigation input.","triggerScenarios":"A navigation mesh component references a collider whose IColliderShapeDesc is an unsupported descriptor type (e.g. a compound or static descriptor) and is not wrapped in a ColliderShapeAssetDesc.","commonSituations":"Hand-authored navigation mesh setup pointing at inline collider shapes, or asset misconfiguration where the shape asset's first description is of the wrong type.","solutions":["Use a ColliderShapeAssetDesc referencing a valid collider shape asset whose first description matches the expected type","Replace the inline descriptor with one of the supported descriptor types","Check the navigation mesh component's collider property in the editor"],"exampleFix":"// before\nnavMeshComponent.Collider = new StaticColliderShapeDesc { ... };\n// after\nnavMeshComponent.Collider = new ColliderShapeAssetDesc { Shape = myColliderShapeAsset };","handlingStrategy":"type-guard","validationCode":"if (desc is not ColliderShapeAssetDesc && desc is not StaticColliderShapeDesc)\n    throw new InvalidOperationException(\"Unsupported collider shape desc for navigation\");","typeGuard":"bool IsNavCompatibleDesc(IColliderShapeDesc d) => d is StaticColliderShapeDesc || d is ColliderShapeAssetDesc;","tryCatchPattern":null,"preventionTips":["Reference collider shapes via ColliderShapeAssetDesc in navigation components","Verify the shape asset's first description matches the expected descriptor type","Configure colliders in the editor rather than hand-authoring descriptors"],"tags":["navigation","collider","configuration"],"backgroundTag":"invalid-argument-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"}