How to make a 9 scale sprite in the new 4.6 UI

Hi All,

I’m using the new 4.6 UI Image and i want to create a scaled button image that can be stretched easily.
For example:

Fig1 is the original button
Fig2 is what i get when i scale up the image
Fig3 is what i expect to get when i scale up the image


I know that other platforms there is 9 scale option:

Is there a way to make 9 scale in Unity?

Edit the borders in the sprite editor.

–Eric

1 Like

Hi Eric,

Thanks for the response!

I have tried making a border but still the picture doesn’t look good when stretching it.

This is the border:

And here is the result (i added also the inspector):

Any ideas why the area out side of the borders are also stretched?

Slicing like that can’t work since you have curved sections mixed in with the straight sections. You need to move the slices closer together, so the curves are isolated in their own sections. Also the image would benefit from extending the middle section vertically a bit, to give the slicing something to work with. As it is, the horizontal slices would have to be nearly touching, and it’s hard to tell if it would quite work. On the other hand, the horizontal straight section is needlessly extended and could be mostly eliminated; you only need a couple of pixels.

–Eric

1 Like

I did :slight_smile:

The screenshot was taken before i did, but the result is after the “apply”.

Still same problem…

Hi Erik,

You are right! thanks a lot!
I have sliced it wrong.

This is how i sliced it now and it is working:

you can also scaled the image smaller, say 0.5 in x and y to make it start to slide properly easier~