# SetVertices

> Assigns a new vertex positions array.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## SetVertices(List\<Vector3>)

Assigns a new vertex positions array.

```csharp
public void SetVertices(List<Vector3> inVertices)
```

### Parameters

**** (\[List\<Vector3>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): Per-vertex positions.

### Remarks

Additional Resources: [Mesh.vertices](/engine/6000.0/script-reference/unityengine/mesh/vertices.md) property.

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

Sets the vertex positions of the Mesh, using a part of the input array.

```csharp
public void SetVertices(List<Vector3> inVertices, int start, int length, MeshUpdateFlags flags)
```

### Parameters

**** (\[List\<Vector3>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): Per-vertex positions.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the first element to take from the input array.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of elements to take from the input array.**** (\[MeshUpdateFlags]\(/engine/6000.0/script-reference/unityengine/rendering/meshupdateflags)): Flags controlling the function behavior, see [MeshUpdateFlags](/engine/6000.0/script-reference/unityengine/rendering/meshupdateflags.md).

### 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.

```csharp
public void SetVertices(Vector3[] inVertices)
```

### Parameters

**** (\[Vector3\[]]\(/engine/6000.0/script-reference/unityengine/vector3)): Per-vertex positions.

### Remarks

Additional Resources: [Mesh.vertices](/engine/6000.0/script-reference/unityengine/mesh/vertices.md) property.

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

Sets the vertex positions of the Mesh, using a part of the input array.

```csharp
public void SetVertices(Vector3[] inVertices, int start, int length, MeshUpdateFlags flags)
```

### Parameters

**** (\[Vector3\[]]\(/engine/6000.0/script-reference/unityengine/vector3)): Per-vertex positions.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the first element to take from the input array.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of elements to take from the input array.**** (\[MeshUpdateFlags]\(/engine/6000.0/script-reference/unityengine/rendering/meshupdateflags)): Flags controlling the function behavior, see [MeshUpdateFlags](/engine/6000.0/script-reference/unityengine/rendering/meshupdateflags.md).

### 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.

```csharp
public void SetVertices<T>(NativeArray<T> inVertices) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Per-vertex positions.

### Remarks

Additional Resources: [Mesh.vertices](/engine/6000.0/script-reference/unityengine/mesh/vertices.md) property.

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

Sets the vertex positions of the Mesh, using a part of the input array.

```csharp
public void SetVertices<T>(NativeArray<T> inVertices, int start, int length, MeshUpdateFlags flags) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Per-vertex positions.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the first element to take from the input array.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of elements to take from the input array.**** (\[MeshUpdateFlags]\(/engine/6000.0/script-reference/unityengine/rendering/meshupdateflags)): Flags controlling the function behavior, see [MeshUpdateFlags](/engine/6000.0/script-reference/unityengine/rendering/meshupdateflags.md).

### 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.
