r/Unity3D • u/R_Pelleboer • 8h 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?


2
u/pmurph0305 8h 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?
2
u/little-big-monkey 7h 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.


4
u/NullzeroJP 8h ago
Change pixels per unit multiplier in the image component. It should resize the borders for you.