修改细节

This commit is contained in:
Caiyanpeng committed 2021-09-03 15:03:54 +08:00
1 parent 2663068574
commit 1254414415
35 files changed
+3557 -3071

No files matched your search

+4
View File
@@ -62,7 +62,11 @@ public class Item : PFUIPanel, IPointerEnterHandler, IPointerExitHandler, IPoint
material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
}
var rect = ((RectTransform)transform).rect;
#if UNITY_ANDROID || UNITY_IOS
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, 10, 0));
#else
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height * 0.5f, 0));
#endif
this.GetComponent<Image>().material = material;
hot = this.transform.Find("Hot");