Skip to content

Commit a0d0dc5

Browse files
committed
README.md Updated. Codestyling DestoryHelper.cs
1 parent 62751ed commit a0d0dc5

12 files changed

+147
-55
lines changed

README.md

+19-35
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,40 @@ These components and shaders allow you to add rounded corners to UI elements!
55

66
---
77

8-
![](gif-00.gif)
8+
![](title.gif)
99

1010
## How to install
11-
### Package Manager UI (Unity 2019.3 and higher)
12-
- In Unity, open the Package Manager window (__Window -> Package Manager__)
13-
- Press the __+__ button in the upper left corner and select __Add package from git URL...__
14-
![](package-manager-00.png)
15-
- Paste the following URL: https://github.com/kirevdokimov/Unity-UI-Rounded-Corners.git and click __Add__
16-
![](package-manager-01.png)
11+
### Option 1: Package Manager (Unity 2019.3 and higher)
12+
![](how-to-install.gif)
13+
URL to copypaste:
14+
```
15+
https://github.com/kirevdokimov/Unity-UI-Rounded-Corners.git
16+
```
1717

18-
### Package Manager (Manual)
18+
### Option 2: Package Manager (Manual)
1919
- Open `%projectname%/Packages/manifest.json`
2020
- Add the following to the dependencies section:
2121
```
2222
"com.nobi.roundedcorners": "https://github.com/kirevdokimov/Unity-UI-Rounded-Corners.git"
2323
```
2424

25-
### Unity Package
25+
### Option 3: Unity Package
2626
Get `.unitypackage` from [releases](https://github.com/kirevdokimov/Unity-UI-Rounded-Corners/releases)
2727

2828
## How to use
29-
### Version 3
30-
#### Same roundness
31-
- Just attach `ImageWithRoundedCorners` to a gameobject with an `Image`
32-
- Profit
33-
#### Separate roundness
34-
- Just attach `ImageWithIndependentRoundedCorners` to a gameobject with an `Image`
35-
- Profit
36-
#### Updates
37-
If you need to add/change the image at runtime, call `Validate()` and/or `Refresh()` to update the materials.
38-
### Version 2 (Legacy)
39-
#### Same roundness
40-
- Attach `ImageWithRoundedCorners` to a gameobject with an `Image`
41-
- Сreate a new material
42-
- Pick the `RoundedCorners` shader
43-
- Attach the material to the `ImageWithRoundedCorners` and the `Image`
44-
- Profit
45-
#### Separate roundness
46-
- Attach `ImageWithIndependentRoundedCorners` to a gameobject with an `Image`
47-
- Сreate a new material
48-
- Pick the `IndependentRoundedCorners` shader
49-
- Attach the material to the `ImageWithIndependentRoundedCorners` and the `Image`
50-
- Profit
29+
#### Symmetrical roundness
30+
- Add `ImageWithRoundedCorners` component to a GameObject with an `Image`
31+
- Adjust `Radius` property
32+
#### Certain roundness value for each corner
33+
- Add `ImageWithIndependentRoundedCorners` to a GameObject with an `Image`
34+
- Adjust
35+
#### Important thing
36+
If you need to add or change the image at runtime, call `Validate()` and then `Refresh()` to update the materials.
37+
5138

5239
# Features
5340
## Changing roundness separately or all at once
54-
![](gif-05.gif)
41+
![](separate-roundness.gif)
5542
## Keeps round while resizing
5643
![](gif-01.gif)
5744
## Better quality than sprites
@@ -61,8 +48,5 @@ If you need to add/change the image at runtime, call `Validate()` and/or `Refres
6148
## Supports Tint
6249
![](gif-04.gif)
6350

64-
# Performance concerns
65-
Each instance of the script creates a separate material at start-up. If you want to share one material with the same rounding radius between multiple images or have more control over when the materials are created and destroyed, use version 2.
66-
6751
# Giving back
6852
If this project has helped you and you'd like to contribute back, you can always [buy me a ☕](https://ko-fi.com/X8X03ULFQ)!

UiRoundedCorners/DestroyHelper.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using UnityEngine;
22

3-
internal static class DestroyHelper
4-
{
3+
internal static class DestroyHelper {
54
internal static void Destroy(Object @object) {
65
#if UNITY_EDITOR
76
if (Application.isPlaying) {

gif-00.gif

-240 KB
Binary file not shown.

gif-05.gif

-305 KB
Binary file not shown.

how-to-install.gif

413 KB
Loading

gif-00.gif.meta how-to-install.gif.meta

+13-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-manager-00.png

-11.3 KB
Binary file not shown.

package-manager-01.png

-10.1 KB
Binary file not shown.

separate-roundness.gif

81 KB
Loading

gif-05.gif.meta separate-roundness.gif.meta

+18-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

title.gif

925 KB
Loading

title.gif.meta

+96
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)