Git Product home page Git Product logo

auto9slicer's Introduction

Auto9Slicer

Auto 9 slice sprite generator on Unity.
(The library used to be called OnionRing)

Buy Me A Coffee

output

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

Screen Shot 2021-01-31 at 11 25 46

Click Run to automatically slice the images in the same directory.

Screen Shot 2021-01-31 at 11 27 20

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/

auto9slicer's People

Contributors

kyubuns avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.