diff --git a/Assets/Scripts/UI/UIDraw.cs b/Assets/Scripts/UI/UIDraw.cs index 41e13012..69513ba9 100644 --- a/Assets/Scripts/UI/UIDraw.cs +++ b/Assets/Scripts/UI/UIDraw.cs @@ -1,12 +1,8 @@ using UnityEngine; using UnityEngine.UI; -using QFramework; using System.IO; -using UnityEngine.Rendering.Universal; using TMPro; -using UnityEngine.EventSystems; using DG.Tweening; -using System; namespace QFramework.Example { @@ -169,8 +165,8 @@ namespace QFramework.Example float sizeY = ((float)Screen.height / (float)Screen.width) * size; ScreenShotPainter.instance.SetEraserSize(size, sizeY); - float width = Screen.width / size; - float height = Screen.width / size;//不缩放y轴了 + float width = 1920 / size; + float height = 1920 / size;//不缩放y轴了 Icon.transform.localScale = new Vector3(width / Icon.rectTransform.rect.width, height / Icon.rectTransform.rect.height, 1); } else @@ -180,8 +176,8 @@ namespace QFramework.Example float sizeY = ((float)Screen.height / (float)Screen.width) * size; ScreenShotPainter.instance.SetPaintingSize(size, sizeY); - float width = Screen.width / size; - float height = Screen.width / size;//不缩放y轴了 + float width = 1920 / size; + float height = 1920 / size;//不缩放y轴了 Icon.transform.localScale = new Vector3(width / Icon.rectTransform.rect.width, height / Icon.rectTransform.rect.height, 1); }