diff --git a/Assets/YooAsset/Runtime/CacheSystem/PersistentHelper.cs b/Assets/YooAsset/Runtime/CacheSystem/PersistentHelper.cs index 52a6b7b..dd757a4 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/PersistentHelper.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/PersistentHelper.cs @@ -23,6 +23,8 @@ namespace YooAsset return new System.Uri(path).ToString(); #elif UNITY_STANDALONE return StringUtility.Format("file:///{0}", path); +#elif UNITY_OPENHARMONY + return path; #else return path; #endif diff --git a/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs b/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs index 3b93500..a970b9e 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs @@ -58,7 +58,12 @@ namespace YooAsset } private static string CreateDefaultBuildinRoot() { - return PathUtility.Combine(UnityEngine.Application.streamingAssetsPath, YooAssetSettingsData.Setting.DefaultYooFolderName); + string path = PathUtility.Combine(UnityEngine.Application.streamingAssetsPath, YooAssetSettingsData.Setting.DefaultYooFolderName); +#if UNITY_OPENHARMONY + return $"file://{path}"; +#else + return path; +#endif } private static string CreateDefaultSandboxRoot() {