# SetNextVertex(Vertex)

> Assigns the value of the next vertex of the allocated vertices list.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public void SetNextVertex(Vertex vertex)
```

### Parameters

**** (\[Vertex]\(/engine/6000.7/script-reference/unityengine/uielements/vertex)): The value of the next vertex.

### Remarks

Used to iteratively fill the values of the allocated vertices via repeated calls to this function until all values have been provided. This way of filling vertex data is mutually exclusive with the use of [MeshWriteData.SetAllVertices](/engine/6000.7/script-reference/unityengine/uielements/meshwritedata/setallvertices.md). After each invocation to this function, the internal counter for the next vertex is automatically incremented. When this method is called, it is not possible to use [MeshWriteData.SetAllVertices](/engine/6000.7/script-reference/unityengine/uielements/meshwritedata/setallvertices.md) to fill the vertices.

Note that calling [MeshWriteData.SetNextVertex](/engine/6000.7/script-reference/unityengine/uielements/meshwritedata/setnextvertex.md) fewer times than the allocated number of vertices will leave the remaining vertices with random values as [MeshGenerationContext.Allocate](/engine/6000.7/script-reference/unityengine/uielements/meshgenerationcontext/allocate.md) does not initialize the returned data to 0 to avoid redundant work.
