Files
YooAsset/Assets/YooAsset/Runtime/BundleCache/Operations/BCClearCacheOperation.cs
2026-03-20 19:51:28 +08:00

42 lines
894 B
C#

namespace YooAsset
{
/// <summary>
/// 清理缓存操作基类
/// </summary>
internal abstract class BCClearCacheOperation : AsyncOperationBase
{
}
/// <summary>
/// 清理缓存完成操作
/// </summary>
internal class BCClearCacheCompleteOperation : BCClearCacheOperation
{
private readonly string _error;
public BCClearCacheCompleteOperation()
{
_error = null;
}
public BCClearCacheCompleteOperation(string error)
{
_error = error;
}
protected override void InternalStart()
{
if (string.IsNullOrEmpty(_error))
{
SetResult();
}
else
{
SetError(_error);
}
}
protected override void InternalUpdate()
{
}
}
}