Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetVertices

Assigns a new vertex positions array.
Read time 2 minutesLast updated 9 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

SetVertices(List<Vector3>)

Assigns a new vertex positions array.
public void SetVertices(List<Vector3> inVertices)

Parameters

inVertices

Per-vertex positions.

Remarks

Additional Resources: Mesh.vertices property.

SetVertices(List<Vector3>, int, int, MeshUpdateFlags)

Sets the vertex positions of the Mesh, using a part of the input array.
public void SetVertices(List<Vector3> inVertices, int start, int length, MeshUpdateFlags flags)

Parameters

inVertices

Per-vertex positions.

start

Index of the first element to take from the input array.

length

Number of elements to take from the input array.

Flags controlling the function behavior, see MeshUpdateFlags.

Remarks

This method behaves as if you called SetVertices with an array that is a slice of the whole array, starting at start index and being of a given length. The resulting Mesh has length amount of vertices.

SetVertices(Vector3[])

Assigns a new vertex positions array.
public void SetVertices(Vector3[] inVertices)

Parameters

inVertices

Per-vertex positions.

Remarks

Additional Resources: Mesh.vertices property.

SetVertices(Vector3[], int, int, MeshUpdateFlags)

Sets the vertex positions of the Mesh, using a part of the input array.
public void SetVertices(Vector3[] inVertices, int start, int length, MeshUpdateFlags flags)

Parameters

inVertices

Per-vertex positions.

start

Index of the first element to take from the input array.

length

Number of elements to take from the input array.

Flags controlling the function behavior, see MeshUpdateFlags.

Remarks

This method behaves as if you called SetVertices with an array that is a slice of the whole array, starting at start index and being of a given length. The resulting Mesh has length amount of vertices.

SetVertices<T>(NativeArray<T>)

Assigns a new vertex positions array.
public void SetVertices<T>(NativeArray<T> inVertices) where T : struct

Parameters

inVertices

Per-vertex positions.

Remarks

Additional Resources: Mesh.vertices property.

SetVertices<T>(NativeArray<T>, int, int, MeshUpdateFlags)

Sets the vertex positions of the Mesh, using a part of the input array.
public void SetVertices<T>(NativeArray<T> inVertices, int start, int length, MeshUpdateFlags flags) where T : struct

Parameters

inVertices

Per-vertex positions.

start

Index of the first element to take from the input array.

length

Number of elements to take from the input array.

Flags controlling the function behavior, see MeshUpdateFlags.

Remarks

This method behaves as if you called SetVertices with an array that is a slice of the whole array, starting at start index and being of a given length. The resulting Mesh has length amount of vertices.