stride3d/stride · error · Exception
Invalid collider shape description
Error message
Invalid collider shape description
What it means
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.
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
Example fix
// before
navMeshComponent.Collider = new StaticColliderShapeDesc { ... };
// after
navMeshComponent.Collider = new ColliderShapeAssetDesc { Shape = myColliderShapeAsset }; Defensive patterns
Strategy: type-guard
Validate before calling
if (desc is not ColliderShapeAssetDesc && desc is not StaticColliderShapeDesc)
throw new InvalidOperationException("Unsupported collider shape desc for navigation"); Type guard
bool IsNavCompatibleDesc(IColliderShapeDesc d) => d is StaticColliderShapeDesc || d is ColliderShapeAssetDesc;
Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- ApplicationDataSubDirectory cannot be modified after the…
- Attributes can not be null
- Binding must be set for
- Cannot perform this action when the physics engine is set…
- Collider type is missing in , please fill an issue or fix it
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/8fd8e731fd180205.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Navigation/NavigationMeshBuilder.cs:677
vertices[i] = new VertexPositionNormalTexture(planePoints[i] + planeOffset, Vector3.UnitY, Vector2.Zero);
}
GeometricMeshData<VertexPositionNormalTexture> meshData = new GeometricMeshData<VertexPositionNormalTexture>(vertices, planeInds, true);
NavigationMeshInputBuilder inputBuilder = new NavigationMeshInputBuilder();
inputBuilder.AppendMeshData(meshData, Matrix.Identity);
return inputBuilder;
}
/// <summary>
/// Extract the collider shape description in the case of it being either an inline shape or an asset as shape
/// </summary>
private TColliderType GetColliderShapeDesc<TColliderType>(IColliderShapeDesc desc) where TColliderType : class, IColliderShapeDesc
{
if (desc is TColliderType direct)
return direct;
if (desc is not ColliderShapeAssetDesc asset)
throw new Exception("Invalid collider shape description");
return asset.Shape.Descriptions.First() as TColliderType;
}
}
}
View on GitHub (pinned to 96fad776d2)