These components and shaders allow you to add rounded corners to UI elements!
URL to copypaste:
https://github.com/kirevdokimov/Unity-UI-Rounded-Corners.git
%projectname%/Packages/manifest.json
"com.nobi.roundedcorners": "https://github.com/kirevdokimov/Unity-UI-Rounded-Corners.git"
ImageWithRoundedCorners
component to a GameObject with an Image
Radius
property
ImageWithIndependentRoundedCorners
to a GameObject with an Image
r
Vector4 property. Each vector component represent radius, clockwise, starting with top-left corner
If you need to add or change the image at runtime, call Validate()
and then Refresh()
to update the materials.