From c801f601d3d69b88443b0b98244c49885ac2df94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=86=A0=E5=B3=B0?= Date: Tue, 14 Jan 2025 14:19:24 +0800 Subject: [PATCH] fix #438 --- .../DownloadSystem/DownloadSystemHelper.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Assets/YooAsset/Runtime/DownloadSystem/DownloadSystemHelper.cs b/Assets/YooAsset/Runtime/DownloadSystem/DownloadSystemHelper.cs index 6f52914b..bd1f24e8 100644 --- a/Assets/YooAsset/Runtime/DownloadSystem/DownloadSystemHelper.cs +++ b/Assets/YooAsset/Runtime/DownloadSystem/DownloadSystemHelper.cs @@ -40,10 +40,20 @@ namespace YooAsset else url = StringUtility.Format("jar:file://{0}", path); #elif UNITY_OPENHARMONY - if (path.StartsWith("jar:file://")) - url = path; + if (UnityEngine.Application.streamingAssetsPath.StartsWith("jar:file://")) + { + if (path.StartsWith("jar:file://")) + url = path; + else + url = StringUtility.Format("jar:file://{0}", path); + } else - url = StringUtility.Format("jar:file://{0}", path); + { + if (path.StartsWith("file://")) + url = path; + else + url = StringUtility.Format("file://{0}", path); + } #elif UNITY_STANDALONE_OSX url = new System.Uri(path).ToString(); #elif UNITY_STANDALONE