GetVertexAttribute<T>(Sprite, VertexAttribute)
Retrieves a strided accessor to the internal vertex attributes.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEngine.U2D
- Assembly: UnityEngine.CoreModule
public static NativeSlice<T> GetVertexAttribute<T>(this Sprite sprite, VertexAttribute channel) where T : struct
Parameters
Returns
Type | Description |
|---|---|
| NativeSlice<T> | 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.