这些组件和着色器可以让你为 UI 元素添加圆角!
https://github.com/Unity-GamerFrameWork/Unity-UI-Rounded-Corners.git
- 为带有
Image游戏对象添加ImageWithRoundedCorners组件 - 调整
Radius属性
- 将
ImageWithIndependentRoundedCorners添加到带有Image游戏对象中 - 调整
rVector4 属性。每个向量分量表示半径,顺时针方向,从左上角开始。
如果需要在运行时添加或更改图像,请 Validate() ,然后 Refresh() 来更新材质。






