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