I tried to make a button that would do the whole 9 slice thing. So… I selected the image, made sure it was Texture Type Sprite (2D and UI) and hit the Sprite Editor button.
I made the slices and hit apply.
Then nothing happened.
The button the image was on was still stretched and selecting Fill Centre didn’t make the middle disappear…
Am I missing something? Why doesn’t this work the way I was told it would work?
Make one slice of the whole thing, then use the green grips to pull them in and make the 9 slice. It stretches each “big” slice based on the green internal ones.
If your sliced corners are larger than the size of your button it’ll look weird. If possible you might slice your corners smaller and/or make the button larger and I think it’ll look ok.
The sliced corners are smaller than the picture altogether. None of the green edges go past where they can go. I believe in the picture I posted above the little rectangle with the green anchor points is the bit that should be stretching.
Move the slices to the tanget of the round part of the corner. You want the corners to be slices as small as possible and the center as large as possible.
Oh I get it. It was really weird because the button was smaller than the picture itself so it didn’t do things as I expected. Otherwise, if I had of made the button bigger it would have worked how I expected.
Thanks guys!