mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-24 17:50:15 +00:00
update patch system
初始化的时候检测覆盖安装
This commit is contained in:
@@ -84,6 +84,8 @@ namespace YooAsset
|
||||
internal static class PersistentHelper
|
||||
{
|
||||
private const string CacheFolderName = "CacheFiles";
|
||||
private const string ManifestFolderName = "ManifestFiles";
|
||||
private const string AppFootPrintFileName = "ApplicationFootPrint.bytes";
|
||||
|
||||
/// <summary>
|
||||
/// 删除沙盒总目录
|
||||
@@ -105,6 +107,16 @@ namespace YooAsset
|
||||
Directory.Delete(root, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除沙盒内的清单文件夹
|
||||
/// </summary>
|
||||
public static void DeleteManifestFolder()
|
||||
{
|
||||
string root = PathHelper.MakePersistentLoadPath(ManifestFolderName);
|
||||
if (Directory.Exists(root))
|
||||
Directory.Delete(root, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存文件夹路径
|
||||
/// </summary>
|
||||
@@ -114,6 +126,14 @@ namespace YooAsset
|
||||
return $"{root}/{packageName}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取应用程序的水印文件路径
|
||||
/// </summary>
|
||||
public static string GetAppFootPrintFilePath()
|
||||
{
|
||||
return PathHelper.MakePersistentLoadPath(AppFootPrintFileName);
|
||||
}
|
||||
|
||||
#region 沙盒内清单相关
|
||||
/// <summary>
|
||||
/// 获取沙盒内清单文件的路径
|
||||
@@ -121,7 +141,7 @@ namespace YooAsset
|
||||
public static string GetCacheManifestFilePath(string packageName)
|
||||
{
|
||||
string fileName = YooAssetSettingsData.GetPatchManifestFileNameWithoutVersion(packageName);
|
||||
return PathHelper.MakePersistentLoadPath(fileName);
|
||||
return PathHelper.MakePersistentLoadPath($"{ManifestFolderName}/{fileName}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user