Interface ISpritePhysicsOutlineDataProvider
Data provider that provides the Physics outline data for SpriteRect.
Namespace: UnityEditor.U2D.Sprites
Syntax
public interface ISpritePhysicsOutlineDataProvider
Remarks
Uses the outline data to generate the Sprite's Physics shape for Polygon Collider 2D.
Methods
GetOutlines(GUID)
Given a GUID, returns the Physics outline data used for the SpriteRect.
Declaration
List<Vector2[]> GetOutlines(GUID guid)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEditor.GUID | guid | GUID of the SpriteRect. |
Returns
| Type | Description |
|---|---|
| List<Vector2[]> | Physics outline data for the SpriteRect. |
GetTessellationDetail(GUID)
Given a GUID, returns the tessellation detail.Tessellation value should be between 0 to 1.
Declaration
float GetTessellationDetail(GUID guid)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEditor.GUID | guid | GUID of the SpriteRect. |
Returns
| Type | Description |
|---|---|
| Single | The tessellation value. |
SetOutlines(GUID, List<Vector2[]>)
Given a GUID, sets the Physics outline data used for the SpriteRect.
Declaration
void SetOutlines(GUID guid, List<Vector2[]> data)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEditor.GUID | guid | GUID of the SpriteRect. |
| List<Vector2[]> | data | Physics outline data for the SpriteRect. |
SetTessellationDetail(GUID, Single)
Given a GUID, sets the tessellation detail.Tessellation value should be between 0 to 1.
Declaration
void SetTessellationDetail(GUID guid, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEditor.GUID | guid | GUID of the SpriteRect. |
| Single | value | The tessellation value. |