Description

Returns a copy of the array containing sprite mesh vertex positions.

// Obtain the vertices from the script and modify the position of one of them. Use OverrideGeometry() for this.
//Attach this script to a SpriteGameObject
//To see the vertices changing, make sure you have your Scene tab visible while in Play mode.
//Press the "Draw Debug" Button in the Game tab during Play Mode to draw the shape. Switch back to the Scene tab to see the shape.

void OnGUI()
{
//Press this Button to show the sprite triangles (in the Scene tab)
if (GUI.Button(buttonPos1, "Draw Debug"))
DrawDebug();
//Press this Button to edit the vertices obtained from the Sprite
if (GUI.Button(buttonPos2, "Perform OverrideGeometry"))
ChangeSprite();
}