Method AppendFaces
AppendFaces(ProBuilderMesh, Vector3[][], Color[][], Vector2[][], Face[], int[][])
Appends a group of new faces to the ProBuilderMesh.
Declaration
public static Face[] AppendFaces(this ProBuilderMesh mesh, Vector3[][] positions, Color[][] colors, Vector2[][] uvs, Face[] faces, int[][] shared)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The source mesh to append new faces to. |
Vector3[][] | positions | An array of position arrays, where the indices correspond to the |
Color[][] | colors | An array of colors arrays, where the indices correspond to the |
Vector2[][] | uvs | An array of UVs arrays, where the indices correspond to the |
Face[] | faces | An array of Face arrays, which contain the triangle winding information for each new face. Face index values are 0 indexed. |
int[][] | shared | An optional mapping of each new vertex's common index. Common index refers to a triangle's index in the sharedVertices array.
If you provide this value, include entries for each vertex position. For example, if there are four vertices in this face, there must be shared index entries for |
Returns
Type | Description |
---|---|
Face[] | An array of the new faces that this method successfully appended to the mesh; null if it failed. |