mirror of https://github.com/tuyoogame/YooAsset
update cache system
parent
7c1873e861
commit
3cfc084e62
|
@ -39,7 +39,6 @@ namespace YooAsset
|
|||
{
|
||||
_findCacheFilesOp = new FindCacheFilesOperation(_packageName);
|
||||
OperationSystem.StartOperation(_findCacheFilesOp);
|
||||
_steps = ESteps.VerifyCacheFiles;
|
||||
}
|
||||
|
||||
Progress = _findCacheFilesOp.Progress;
|
||||
|
@ -55,7 +54,6 @@ namespace YooAsset
|
|||
{
|
||||
_verifyCacheFilesOp = VerifyCacheFilesOperation.CreateOperation(_findCacheFilesOp.VerifyElements);
|
||||
OperationSystem.StartOperation(_verifyCacheFilesOp);
|
||||
_steps = ESteps.VerifyCacheFiles;
|
||||
}
|
||||
|
||||
Progress = _verifyCacheFilesOp.Progress;
|
||||
|
|
|
@ -124,19 +124,31 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取缓存的BundleFile文件夹路径
|
||||
/// </summary>
|
||||
private readonly static Dictionary<string, string> _cachedBundleFileFolder = new Dictionary<string, string>(100);
|
||||
public static string GetCachedBundleFileFolderPath(string packageName)
|
||||
{
|
||||
if (_cachedBundleFileFolder.TryGetValue(packageName, out string value) == false)
|
||||
{
|
||||
string root = PathHelper.MakePersistentLoadPath(CacheFolderName);
|
||||
return $"{root}/{packageName}/{CachedBundleFileFolder}";
|
||||
value = $"{root}/{packageName}/{CachedBundleFileFolder}";
|
||||
_cachedBundleFileFolder.Add(packageName, value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的RawFile文件夹路径
|
||||
/// </summary>
|
||||
private readonly static Dictionary<string, string> _cachedRawFileFolder = new Dictionary<string, string>(100);
|
||||
public static string GetCachedRawFileFolderPath(string packageName)
|
||||
{
|
||||
if (_cachedRawFileFolder.TryGetValue(packageName, out string value) == false)
|
||||
{
|
||||
string root = PathHelper.MakePersistentLoadPath(CacheFolderName);
|
||||
return $"{root}/{packageName}/{CachedRawFileFolder}";
|
||||
value = $"{root}/{packageName}/{CachedRawFileFolder}";
|
||||
_cachedRawFileFolder.Add(packageName, value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue