Method WeldVertices
WeldVertices(ProBuilderMesh, IEnumerable<int>, float)
Similar to Merge vertices, expect that this method only collapses vertices within a specified distance
of one another (typically Mathf.Epsilon
is used).
This is equivalent to the Weld Vertices action.
Declaration
public static int[] WeldVertices(this ProBuilderMesh mesh, IEnumerable<int> indexes, float neighborRadius)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The source mesh. |
IEnumerable<int> | indexes | The vertex indices to consider. For example, to weld the entire object, set this value to the return value from |
float | neighborRadius | The minimum distance between vertices to consider them for welding. |
Returns
Type | Description |
---|---|
int[] | The indices of any new vertices created by a weld. |