From 5a384fbb8980bc091dda72c0217e9d2312e8cd3e Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Sat, 21 Nov 2020 08:41:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DUnity5=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Internal/Utility/XChartsMgr.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Runtime/Internal/Utility/XChartsMgr.cs b/Runtime/Internal/Utility/XChartsMgr.cs index 1f0c2497..d23a6e30 100644 --- a/Runtime/Internal/Utility/XChartsMgr.cs +++ b/Runtime/Internal/Utility/XChartsMgr.cs @@ -107,25 +107,41 @@ namespace XCharts networkError = ""; var url = "https://raw.githubusercontent.com/monitor1394/unity-ugui-XCharts/master/Assets/XCharts/package.json"; var web = UnityWebRequest.Get(url); +#if UNITY_5 + yield return web.Send(); +#else yield return web.SendWebRequest(); +#endif CheckVersionWebRequest(web); if (isNetworkError) { url = "https://gitee.com/monitor1394/unity-ugui-XCharts/raw/master/Assets/XCharts/package.json"; web = UnityWebRequest.Get(url); +#if UNITY_5 + yield return web.Send(); +#else yield return web.SendWebRequest(); +#endif CheckVersionWebRequest(web); } if (needUpdate) { url = "https://raw.githubusercontent.com/monitor1394/unity-ugui-XCharts/master/Assets/XCharts/CHANGELOG.md"; web = UnityWebRequest.Get(url); +#if UNITY_5 + yield return web.Send(); +#else yield return web.SendWebRequest(); +#endif if (!CheckLogWebRequest(web)) { url = "https://gitee.com/monitor1394/unity-ugui-XCharts/raw/master/Assets/XCharts/CHANGELOG.md"; web = UnityWebRequest.Get(url); +#if UNITY_5 + yield return web.Send(); +#else yield return web.SendWebRequest(); +#endif CheckLogWebRequest(web); } }