# SetVertexCount(Sprite, int)

> Sets the vertex count. This resizes the internal buffer. It also preserves any configurations of VertexAttributes.

## Definition

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

```csharp
public static void SetVertexCount(this Sprite sprite, int count)
```

### Parameters

**** (\[Sprite]\(/engine/6000.5/script-reference/unityengine/sprite)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)):&#x20;
