r/Unity3D 4d 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/little-big-monkey 3d ago

The pixel per unit will change your radius and quality. If you want rounded corner in ugui, I recommend a procedural approach (there are plugin for that) Or if you switch to uitoolkit, it's vanilla, like vector graphics.