Could you please add an extra MeshType to the NavMeshCut which is a Custom Polygon. This takes in an array of Vector3 or float3 points that represents the outline of the polygon. This would be far more performant for me than triangulating a mesh object at run time to represent my shape and then your code is also having to calculate the bounds and contour of the mesh every time i use the shape to cut which is a lot of heap allocation and wasted calculations and in my case not necessary since i already have the contour and bounds.
Since i already have the contour defined by my array of points i would like to just pass that in as the shape straight away and i can pass in the bounds since i also already calculated that so that does not need to be recalculated either.
The rules of the input should simply be the points have to be on the same plane eg (x,y,0) or (x,0,z) and this accompanies the height field that NavMesh Cut already provides.
For added performance it would be nice to optionally skip any checking of the points being on the same plane since my input already guarantees that.
The added benefit of Custom Polygon is i can still represent the basic mesh types like rectangle & circle and a variety of other shapes convex and concave shapes without the need to generate meshes and it would also support RadiusExpansionMode, of which the custom mesh version does not support.
A visual example of what i mean https://i.imgur.com/dE1eKnK.gif
This would be far more performant in my case so i can skip making meshes and skip calculating the boundary which is more heap allocations that i don’t even need since I have the shape defined already.
Or if you don’t plan to support this can you explain how i can integrate it, i looked at the navmesh cut and navmesh clipper scripts but its a bit complicated to figure out how to add the feature.