From d89d4427c11df80258f04638f125ed4762c38c19 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Fri, 25 Jun 2021 11:12:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=83=8C=E6=99=AF=E9=80=82=E9=85=8D?= =?UTF-8?q?=E3=80=91=E4=BC=98=E5=8C=96=E5=AE=BD=E5=B1=8F=E4=B8=8B=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UIBgAdaptive.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/UI/UIBgAdaptive.cs b/Assets/Scripts/UI/UIBgAdaptive.cs index 976c72d7c5..69947ef52e 100644 --- a/Assets/Scripts/UI/UIBgAdaptive.cs +++ b/Assets/Scripts/UI/UIBgAdaptive.cs @@ -24,7 +24,7 @@ public class UIBgAdaptive : MonoBehaviour //float curHeight = 1920 * (Screen.height / Screen.width) / (1920 / 1080); //float curWidth = (1080f / 1920f) * curHeight; //bgList[i].GetComponent().sizeDelta = new Vector2(curWidth, curHeight); - if (Screen.height >= 1920) + if (Screen.height/Screen.width >= 1920/1080f) { //--计算比例因子 比例因子 = 10 ^ ((lg(屏幕宽 / 开发宽) + lg(屏幕高 / 开发高) / 2)) //local log = math.log(Screen.width / 1080, 10) + math.log(Screen.height / 1920, 10)