feat : support open harmony

支持华为鸿蒙系统
pull/255/head
hevinci 2024-03-13 15:50:46 +08:00
parent 4e8840cd93
commit 4c619778c3
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

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