GetVertexAttribute<T>(Sprite, VertexAttribute)
Retrieves a strided accessor to the internal vertex attributes.
阅读时间1 分钟最后更新于 1 个月前
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.