# vertices

> Returns a copy of the vertex positions or assigns a new vertex positions array.

## Definition

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

```csharp
public Vector3[] vertices { get; set; }
```

### Remarks

The number of vertices in the Mesh is changed by assigning a vertex array with a different number of vertices.

If you resize the vertex array then all other vertex attributes (normals, colors, tangents, UVs) are automatically resized too. [Mesh.RecalculateBounds](/engine/6000.7/script-reference/unityengine/mesh/recalculatebounds.md) is automatically invoked if no vertices have been assigned to the Mesh when setting the vertices.

Note that this method returns the vertices in local space, not in world space.

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    Mesh mesh;
    Vector3[] vertices;
    void Start()
    {
        mesh = GetComponent<MeshFilter>().mesh;
        vertices = mesh.vertices;
    }

    void Update()
    {
        for (var i = 0; i < vertices.Length; i++)
        {
            vertices[i] += Vector3.up * Time.deltaTime;
        }

        // assign the local vertices array into the vertices array of the Mesh.
        mesh.vertices = vertices;
        mesh.RecalculateBounds();
    }
}
```

**Note:** To make changes to the [Mesh.vertices](/engine/6000.7/script-reference/unityengine/mesh/vertices.md) it is important to copy the vertices from the [Mesh](/engine/6000.7/script-reference/unityengine/mesh.md). Once the [Mesh.vertices](/engine/6000.7/script-reference/unityengine/mesh/vertices.md) have been copied and changed the [Mesh.vertices](/engine/6000.7/script-reference/unityengine/mesh/vertices.md) can be reassigned back to the [Mesh](/engine/6000.7/script-reference/unityengine/mesh.md).
