# GetVertexAttribute<T>(Sprite, VertexAttribute)

> Retrieves a strided accessor to the internal vertex attributes.

## Definition

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

```csharp
public static NativeSlice<T> GetVertexAttribute<T>(this Sprite sprite, VertexAttribute channel) where T : struct
```

### Parameters

**** (\[Sprite]\(/engine/6000.6/script-reference/unityengine/sprite)): **** (\[VertexAttribute]\(/engine/6000.6/script-reference/unityengine/rendering/vertexattribute)):&#x20;

### Returns

| Type                                                                                 | Description          |
| ------------------------------------------------------------------------------------ | -------------------- |
| [NativeSlice\<T>](/engine/6000.6/script-reference/unity/collections/nativeslice1.md) | A read-only list of. |

### Remarks

This is the only way to access all the various channels of the vertex attributes.

Here are the types corresponding to the VertexAttributes.

Position -> Vector3

Normal -> Vector3

Color -> Color32

UV0-3 -> Vector2

Tangent -> Vector4.
