mirror of https://github.com/tuyoogame/YooAsset
parent
4d7fb6301a
commit
812c46adeb
|
@ -23,6 +23,15 @@ namespace YooAsset
|
|||
_cachedDic.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 清空指定包裹的所有缓存数据
|
||||
/// </summary>
|
||||
public static void ClearPackage(string packageName)
|
||||
{
|
||||
var cache = GetOrCreateCache(packageName);
|
||||
cache.ClearAll();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存文件总数
|
||||
/// </summary>
|
||||
|
|
|
@ -150,6 +150,9 @@ namespace YooAsset
|
|||
YooLogger.Log($"Destroy resource package : {packageName}");
|
||||
_packages.Remove(package);
|
||||
package.DestroyPackage();
|
||||
|
||||
// 清空缓存
|
||||
CacheSystem.ClearPackage(packageName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue