Sprite Editor: how to slice a sprite?

Anybody has succesfully worked with the sprite editor to do this? https://github.com/cocos-creator/creator-docs/blob/master/source/en/ui/sliced-sprite.md

I’m trying but Im not sure I fully understand the instructions and I dont know how to create the 9 sliced parts from a single sprite.

Thanks,

Edit: got it! I just checked the examples project (https://github.com/cocos-creator/example-cases)and saw how it works. The examples project is the most useful tool I’ve found to learn Creator. Thanks! :smiley:

1 Like

Thanks for your feedback!

And how to do it PROGRAMMATICALLY ?
I’ve tried many ways to set spriteComponent’s properties at runtime with no luck

Ex:
var N = new cc.Node; N.addComponent(cc.Sprite);
N.getComponent(cc.Sprite).type = cc.Sprite.Type.TILED

But nothing changed. Please give us a clear answer. CAN WE DO IT ? Thanks

No need to scream

1 Like