Эффект округления углов для UI спрайтов.
🔗Описание:
Как использовать:
Симметричное скругление
Добавьте компонент ImageWithRoundedCorners на GameObject, у которого уже есть компонент Image.
Настройте свойство Radius.
Индивидуальное скругление для каждого угла
Добавьте компонент ImageWithIndependentRoundedCorners на GameObject с компонентом Image.
Настройте свойство r (Vector4). Каждый компонент вектора (X, Y, Z, W) отвечает за радиус своего угла по часовой стрелке, начиная с левого верхнего (X).
Важно:
Если вам нужно добавить или изменить изображение во время выполнения (runtime), вызовите Validate(), а затем Refresh(), чтобы обновить материалы.
🔗Description:
How to use:
Symmetrical Roundness
Add the ImageWithRoundedCorners component to a GameObject that has an Image component.
Adjust the Radius property.
Certain roundness value for each corner
Add the ImageWithIndependentRoundedCorners component to a GameObject that has an Image.
Adjust the r (Vector4) property. Each component of the vector (X, Y, Z, W) represents the radius for a corner, clockwise, starting with the top-left (X).
Important:
If you need to add or change the image at runtime, call Validate() and then Refresh() to update the materials.
📘License:
MIT License
Download link:
https://t.me/arhivunitymaker/116