https://github.com/kirevdokimov/unity-ui-rounded-corners
These components and shaders allow you to add rounded corners to UI elements!
https://github.com/kirevdokimov/unity-ui-rounded-corners
c-sharp cg hlsl shader shaderlab ui unity
Last synced: about 23 hours ago
JSON representation
These components and shaders allow you to add rounded corners to UI elements!
- Host: GitHub
- URL: https://github.com/kirevdokimov/unity-ui-rounded-corners
- Owner: kirevdokimov
- License: mit
- Created: 2019-03-03T15:19:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-19T13:23:02.000Z (6 months ago)
- Last Synced: 2025-04-06T12:12:00.667Z (about 1 month ago)
- Topics: c-sharp, cg, hlsl, shader, shaderlab, ui, unity
- Language: C#
- Homepage:
- Size: 4.28 MB
- Stars: 1,530
- Watchers: 23
- Forks: 128
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unity-UI-Rounded-Corners
These components and shaders allow you to add rounded corners to UI elements!
---

## How to install
### Option 1: Package Manager (Unity 2019.3 and higher)

URL to copypaste:
```
https://github.com/kirevdokimov/Unity-UI-Rounded-Corners.git
```### Option 2: Package Manager (Manual)
- Open `%projectname%/Packages/manifest.json`
- Add the following to the dependencies section:
```
"com.nobi.roundedcorners": "https://github.com/kirevdokimov/Unity-UI-Rounded-Corners.git"
```## How to use
#### Symmetrical roundness
- Add `ImageWithRoundedCorners` component to a GameObject with an `Image`
- Adjust `Radius` property
#### Certain roundness value for each corner
- Add `ImageWithIndependentRoundedCorners` to a GameObject with an `Image`
- Adjust `r` Vector4 property. Each vector component represent radius, clockwise, starting with top-left corner
#### Important thing
If you need to add or change the image at runtime, call `Validate()` and then `Refresh()` to update the materials.# Features
## Changing roundness separately or all at once

## Keeps round while resizing

## Better quality than sprites

## Supports Unity Mask

## Supports Tint
