From 53610b53caf8773cea3fc549631062f03c30fd8b Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Thu, 13 Oct 2022 07:52:47 +0800 Subject: [PATCH] [fix] Fixed `Download` interface caused the iOS platform to fail to build --- CHANGELOG.md | 1 + Runtime/Internal/Utilities/ChartHelper.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60965ecb..9770b831 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ ## master +* (2022.10.13) 修复`Download`的接口造成`iOS`平台打包失败的问题 * (2022.10.12) 增加`Animation`的`UnscaledTime`支持设置动画是否受TimeScale的影响 (#223) * (2022.10.10) 调整文档格式 * (2022.10.10) 增加`Line`的`SmoothLimit`可控制平滑曲线不同效果 diff --git a/Runtime/Internal/Utilities/ChartHelper.cs b/Runtime/Internal/Utilities/ChartHelper.cs index d1c5f7a9..77f79b21 100644 --- a/Runtime/Internal/Utilities/ChartHelper.cs +++ b/Runtime/Internal/Utilities/ChartHelper.cs @@ -898,8 +898,10 @@ namespace XCharts.Runtime else return valueOrRate; } +#if UNITY_WEBGL [DllImport("__Internal")] private static extern void Download(string base64str, string fileName); +#endif public static Texture2D SaveAsImage(RectTransform rectTransform, Canvas canvas, string imageType = "png", string path = "") {