iphone7以下光圈去掉

This commit is contained in:
CaiYanPeng 2021-09-16 19:49:45 +08:00
parent 806116af19
commit 26250f3e47
3 changed files with 21 additions and 1 deletions

View File

@ -8,6 +8,7 @@ using System.Net;
using System.Globalization; using System.Globalization;
using System.Threading; using System.Threading;
using Assets.Scripts.Devices; using Assets.Scripts.Devices;
using Assets.Scripts;
public static class App public static class App
{ {
@ -95,5 +96,6 @@ public static class App
#endif #endif
Screen.sleepTimeout = SleepTimeout.NeverSleep; Screen.sleepTimeout = SleepTimeout.NeverSleep;
Debug.Log(SystemInfo.deviceModel);
} }
} }

View File

@ -42,10 +42,16 @@ public class EarthController : PFUIPanel
rootPanel = this.transform.Find("Canvas").Find("Panel"); rootPanel = this.transform.Find("Canvas").Find("Panel");
map = WorldMapGlobe.instance; map = WorldMapGlobe.instance;
#if UNITY_IOS
if (Utils.isLowIPhone())
{
map.earthScenicGlowIntensity = 0;
}
#endif
map.showProvinces = true; map.showProvinces = true;
map.showCities = true; map.showCities = true;
//map.autoRotationSpeed = 0f; //map.autoRotationSpeed = 0f;
//map.autoRotationSpeed = 0.1f; //map.autoRotationSpeed = 0.1f;
//Camera.main.fieldOfView = 180; //Camera.main.fieldOfView = 180;

View File

@ -77,6 +77,18 @@ namespace Assets.Scripts
return output; return output;
} }
public static bool isLowIPhone()
{
var info = SystemInfo.deviceModel;
if (info.Contains("iPhone"))
{
//iPhone2,1
var s = info.Replace("iPhone", "").Split(',');
return s.Length == 2 && int.Parse(s[0]) < 9;
}
return false;
}
/*获取ip*/ /*获取ip*/
/*显示简略提示需要拖Toast的预制件且保证其他组件名字不是Toast,ToastContainer*/ /*显示简略提示需要拖Toast的预制件且保证其他组件名字不是Toast,ToastContainer*/
private static Dictionary<int, string> _toastDict; private static Dictionary<int, string> _toastDict;