diff --git a/Assets/YooAsset/Runtime/CacheSystem/Persistent.cs b/Assets/YooAsset/Runtime/CacheSystem/Persistent.cs index 8d96192d..56010d20 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/Persistent.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/Persistent.cs @@ -46,7 +46,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() { diff --git a/Assets/YooAsset/Runtime/CacheSystem/PersistentTools.cs b/Assets/YooAsset/Runtime/CacheSystem/PersistentTools.cs index f17127d0..4a2aefbd 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/PersistentTools.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/PersistentTools.cs @@ -47,6 +47,8 @@ namespace YooAsset return StringUtility.Format("file:///{0}", path); #elif UNITY_WEBGL return path; +#elif UNITY_OPENHARMONY + return path; #endif } }