Interface ISpriteMeshDataProvider
Data Provider interface that deals with Sprite mesh data.
Namespace: UnityEditor.U2D.Sprites
Assembly: Unity.2D.Sprite.Editor.dll
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 |
---|---|---|
GUID | guid | Sprite ID. |
Returns
Type | Description |
---|---|
Vector2Int[] | Returns the edges for the given Sprite ID. |
GetIndices(GUID)
Returns the list of mesh index for the corresponding Sprite ID.
Declaration
int[] GetIndices(GUID guid)
Parameters
Type | Name | Description |
---|---|---|
GUID | guid | Sprite ID. |
Returns
Type | Description |
---|---|
int[] | Returns the indices for the given Sprite ID. |
GetVertices(GUID)
Returns the list of vertex datas for the corresponding Sprite ID.
Declaration
Vertex2DMetaData[] GetVertices(GUID guid)
Parameters
Type | Name | Description |
---|---|---|
GUID | guid | Sprite ID. |
Returns
Type | Description |
---|---|
Vertex2DMetaData[] | Returns the vertices for the given Sprite ID. |
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 |
---|---|---|
GUID | guid | Sprite ID. |
Vector2Int[] | edges | An array of Vector2Int representing the edges for the Sprite ID. |
SetIndices(GUID, int[])
Sets a new list of indices for the corresponding Sprite ID.
Declaration
void SetIndices(GUID guid, int[] indices)
Parameters
Type | Name | Description |
---|---|---|
GUID | guid | Sprite ID. |
int[] | indices | The indices to set for the Sprite ID. |
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 |
---|---|---|
GUID | guid | Sprite ID. |
Vertex2DMetaData[] | vertices | The vertices to set for the Sprite ID. |