Files
YooAsset/Assets/YooAsset/Runtime/FileSystem/Operation/FSLoadBundleOperation.cs
何冠峰 d570ba8d74 fix #661
2025-10-30 18:31:06 +08:00

44 lines
1.1 KiB
C#

namespace YooAsset
{
internal abstract class FSLoadBundleOperation : AsyncOperationBase
{
/// <summary>
/// 加载结果
/// </summary>
public BundleResult Result { protected set; get; }
/// <summary>
/// 下载进度
/// </summary>
public float DownloadProgress { protected set; get; } = 0;
/// <summary>
/// 下载大小
/// </summary>
public long DownloadedBytes { protected set; get; } = 0;
/// <summary>
/// 终止下载文件
/// </summary>
public bool AbortDownloadFile = false;
}
internal sealed class FSLoadBundleCompleteOperation : FSLoadBundleOperation
{
private readonly string _error;
internal FSLoadBundleCompleteOperation(string error)
{
_error = error;
}
internal override void InternalStart()
{
Status = EOperationStatus.Failed;
Error = _error;
}
internal override void InternalUpdate()
{
}
}
}