Auto9Slicer
Auto 9 slice sprite generator on Unity.
(The library used to be called OnionRing
)
Instructions
- Package Manager
https://github.com/kyubuns/Auto9Slicer.git?path=Assets/Auto9Slicer
- AssetStore
- If you purchase it from AssetStore, it will be a AssetStore License. For this reason, it is sold for a fee.
Simple Use
Create Auto9SliceTester. Assets > Create > Auto 9Slice > Tester
Click Run
to automatically slice the images in the same directory.
From Script
Add it to your EditorScript so that it will be executed at your desired timing.
var slicedTexture = Auto9Slicer.Slicer.Slice(texture, SliceOptions.Default);
textureImporter.spriteBorder = slicedTexture.Border.ToVector4();
File.WriteAllBytes(filePath, slicedTexture.Texture.EncodeToPNG());
Requirements
- Requires Unity2019.4 or later
License
MIT License (see LICENSE)
Buy me a coffee
Are you enjoying save time?
Buy me a coffee if you love my code!
https://www.buymeacoffee.com/kyubuns
"I used it for this game!"
I'd be happy to receive reports like "I used it for this game!"
Please contact me by email, twitter or any other means.
(This library is MIT licensed, so reporting is NOT mandatory.)
https://kyubuns.dev/