mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-25 10:11:51 +00:00
update cache system
优化了缓存系统初始化逻辑,支持分帧获取所有缓存文件。
This commit is contained in:
@@ -84,6 +84,8 @@ namespace YooAsset
|
||||
internal static class PersistentHelper
|
||||
{
|
||||
private const string CacheFolderName = "CacheFiles";
|
||||
private const string CachedBundleFileFolder = "BundleFiles";
|
||||
private const string CachedRawFileFolder = "RawFiles";
|
||||
private const string ManifestFolderName = "ManifestFiles";
|
||||
private const string AppFootPrintFileName = "ApplicationFootPrint.bytes";
|
||||
|
||||
@@ -120,12 +122,21 @@ namespace YooAsset
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存文件夹路径
|
||||
/// 获取缓存的BundleFile文件夹路径
|
||||
/// </summary>
|
||||
public static string GetCacheFolderPath(string packageName)
|
||||
public static string GetCachedBundleFileFolderPath(string packageName)
|
||||
{
|
||||
string root = PathHelper.MakePersistentLoadPath(CacheFolderName);
|
||||
return $"{root}/{packageName}";
|
||||
return $"{root}/{packageName}/{CachedBundleFileFolder}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的RawFile文件夹路径
|
||||
/// </summary>
|
||||
public static string GetCachedRawFileFolderPath(string packageName)
|
||||
{
|
||||
string root = PathHelper.MakePersistentLoadPath(CacheFolderName);
|
||||
return $"{root}/{packageName}/{CachedRawFileFolder}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user