Interface ISpriteMeshDataProvider
Data Provider interface that deals with Sprite mesh data.
Namespace: UnityEditor.U2D.Sprites
Syntax
public interface ISpriteMeshDataProvider
Methods
GetEdges(GUID)
Returns the list of mesh edges for the corresponding Sprite ID.
Declaration
Vector2Int[] GetEdges(GUID guid)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEditor.GUID | guid | Sprite ID. |
Returns
| Type | Description |
|---|---|
| Vector2Int[] |
GetIndices(GUID)
Returns the list of mesh index for the corresponding Sprite ID.
Declaration
int[] GetIndices(GUID guid)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEditor.GUID | guid | Sprite ID. |
Returns
| Type | Description |
|---|---|
| Int32[] |
GetVertices(GUID)
Returns the list of vertex datas for the corresponding Sprite ID.
Declaration
Vertex2DMetaData[] GetVertices(GUID guid)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEditor.GUID | guid | Sprite ID. |
Returns
| Type | Description |
|---|---|
| Vertex2DMetaData[] |
SetEdges(GUID, Vector2Int[])
Sets a new list of edges for the corresponding Sprite ID.
Declaration
void SetEdges(GUID guid, Vector2Int[] edges)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEditor.GUID | guid | Sprite ID. |
| Vector2Int[] | edges |
SetIndices(GUID, Int32[])
Sets a new list of indices for the corresponding Sprite ID.
Declaration
void SetIndices(GUID guid, int[] indices)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEditor.GUID | guid | Sprite ID. |
| Int32[] | indices |
SetVertices(GUID, Vertex2DMetaData[])
Sets a new list of vertices for the corresponding Sprite ID.
Declaration
void SetVertices(GUID guid, Vertex2DMetaData[] vertices)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEditor.GUID | guid | Sprite ID. |
| Vertex2DMetaData[] | vertices |