feat : support open harmony

main
hevinci 2024-03-13 15:42:23 +08:00
parent 135d5b4f5b
commit 92ac301716
2 changed files with 8 additions and 1 deletions

View File

@ -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()
{

View File

@ -47,6 +47,8 @@ namespace YooAsset
return StringUtility.Format("file:///{0}", path);
#elif UNITY_WEBGL
return path;
#elif UNITY_OPENHARMONY
return path;
#endif
}
}