1

I am trying to decompose this sprite into separate image files. The metadata for the sprite is here. I opened the project in Unity but couldn't find out how to decompose the sprites into separate files.

Since there is a metadata file that has the information for sprite position, width and height, no auto-detection is needed. All I need is a program that's gonna read the metadata file, find the sprite position, width and height data and extract the sprites from the image file.

Utku
  • 2,025
  • 22
  • 42

1 Answers1

3

Unity3D has shipped this function with its SpriteEditor:

Automatic Slicing

Isolating the sprite rectangles manually works well but in many cases, Unity can save you work by detecting the graphic elements and extracting them for you automatically. If you click on the Slice menu in the control bar, you will see this panel:

enter image description here

Below include some other(programmatic) solutions as well:

Community
  • 1
  • 1
David
  • 15,894
  • 22
  • 55
  • 66
  • I clicked the "Slice" menu and that pop-up shows but I don't know what to do after that. I am trying to save the sliced sprites as separate images. – Utku Aug 15 '18 at 01:17
  • There is also a metadata file that has the information for sprite position, width and height. Hence, no auto-detection is needed. All I need is a program that's gonna read the metadata file, find the sprite position, width and height data and extract the sprites from the image file. – Utku Aug 15 '18 at 01:36
  • Why do you need separate sprites? Unity itself can handle multiple sprite assets in one file just fine. – This company is turning evil. Aug 15 '18 at 21:58