Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetNextVertex(Vertex)

Assigns the value of the next vertex of the allocated vertices list.
Read time 1 minuteLast updated 10 days ago

Definition

public void SetNextVertex(Vertex vertex)

Parameters

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. 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 to fill the vertices.
Note that calling MeshWriteData.SetNextVertex fewer times than the allocated number of vertices will leave the remaining vertices with random values as MeshGenerationContext.Allocate does not initialize the returned data to 0 to avoid redundant work.