Can anybody tell how does a person slice a sprite programmatically? I mean not just slice, but to represent the sliced sprites like Unity does.
You need to be more specific on what you mean by slicing. Do you mean tiling, or perhaps a random cut through 1 object, making it 2 objects? algorithm - How can I split a Polygon by a Line? - Stack Overflow
In sprite editor there is a slice button. So in base libs there should be some function that is called when that button is clicked. If there is such a thing, I’d like to use it, but i searched all the docs and got nothing. Or if there is not such a thing, then can you tell the structure of a sliced sprite? How can I represent my sprite like Unity does (I am speaking about hierarchy of sprite when you slice it).
I don’t know how to do that, but here’s google search that seems to give answers:
unity sprite slice by code