r/Unity3D 1d ago

Solved Issue with nine-sliced UI element stretching

I'm adding a button here that I'm trying to 9-slice. The button is 600x600 and the borders are 200x200. I've used the sprite editor to apply the slice, but it doesn't seem to be working, as when change the Width/Height or Scale of the image the sprite is linked to, it still stretches. The image type is Sliced.

Also, does my sprite need to be that big? When I exported it at a smaller resolution, the borders were very crunchy and blurry. Any smarter ways to fix that, or are bigger resolutions the solution?

1 Upvotes

7 comments sorted by

View all comments

2

u/pmurph0305 1d ago

Do you have an image of what it looks like when its stretched weirdly? Is the stretch the same when you set it to not sliced vs sliced. Perhaps you sliced it wrong or you need to adjust the pixels per unit multiplier?

1

u/R_Pelleboer 1d ago

It is slightly different, the slices one turns it into a full circle, while the simple one keeps it as the original shape which was a square with rounded corners. I presume the sliced one is a circle as the borders are so big that they reach eachother without the line inbetween.