- Home /
How to make a square button with rounded corners.
I have found a lot of answers to the same question but it does not work. since the earliest answer I found was from 2015 I wonder if something has changed. using version 5.5.0f3
I have a picture of a square with rounded corners and have made it into a sprite (2D and UI). I pressed sprite editor and pulled in the green borders to the perfect place. I added the picture on a UI picture in the scene and set the image type to sliced.
after those steps I have a round button (the 4 corners of the picture are visible but nothing else) and when I scale in the rect transform the picture becomes an oval instead of a square with rounded corners. the standard UISprite Texture works fine and that's the effect I want with my own texture.
for now I might just let it as it is but it looks like the function is suppose to exist.
Answer by jkramar · Feb 02, 2017 at 08:52 PM
It could be the size of your sprite is too large vs the size of your button. Try reducing the size of your sprite in its import settings.
Your answer
Follow this Question
Related Questions
Image in Button is cut (New UI) 2 Answers
How to have correct color on imGUI Buttons (as dynamic textures) avoiding multiply effect ? 1 Answer
Unity - destroy clone child object (button) 1 Answer
Button.onClick.AddListener inconsistent 0 Answers
Why is this 'less or equal' unit connected to the 'output' unit directly? 0 Answers