using UnityEngine; namespace YooAsset { internal abstract class FSLoadBundleOperation : AsyncOperationBase { /// /// 加载结果 /// public BundleResult Result { protected set; get; } /// /// 下载进度 /// public float DownloadProgress { protected set; get; } = 0; /// /// 下载大小 /// public long DownloadedBytes { protected set; get; } = 0; /// /// 终止下载任务 /// public abstract void AbortDownloadOperation(); } internal sealed class FSLoadBundleCompleteOperation : FSLoadBundleOperation { private readonly string _error; internal FSLoadBundleCompleteOperation(string error) { _error = error; } internal override void InternalOnStart() { Status = EOperationStatus.Failed; Error = _error; } internal override void InternalOnUpdate() { } public override void AbortDownloadOperation() { } } }