refactor : 重构异步操作模块
This commit is contained in:
@@ -224,12 +224,12 @@ namespace YooAsset
|
||||
InternalAbort();
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = "user abort";
|
||||
YooLogger.Warning($"Async operaiton {this.GetType().Name} has been abort !");
|
||||
YooLogger.Warning($"Async operation {this.GetType().Name} has been aborted !");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 结束异步任务
|
||||
/// 强制结束异步任务
|
||||
/// </summary>
|
||||
internal void FinishOperation()
|
||||
{
|
||||
@@ -348,6 +348,25 @@ namespace YooAsset
|
||||
float s = UnityEngine.Mathf.FloorToInt(spawnTime - m * 60f - h * 3600f);
|
||||
return h.ToString("00") + ":" + m.ToString("00") + ":" + s.ToString("00");
|
||||
}
|
||||
|
||||
internal DebugOperationInfo GetDebugOperationInfo()
|
||||
{
|
||||
var operationInfo = new DebugOperationInfo();
|
||||
operationInfo.OperationName = this.GetType().Name;
|
||||
operationInfo.OperationDesc = GetOperationDesc();
|
||||
operationInfo.Priority = Priority;
|
||||
operationInfo.Progress = Progress;
|
||||
operationInfo.BeginTime = BeginTime;
|
||||
operationInfo.ProcessTime = ProcessTime;
|
||||
operationInfo.Status = Status.ToString();
|
||||
operationInfo.Childs = new List<DebugOperationInfo>(Childs.Count);
|
||||
foreach (var child in Childs)
|
||||
{
|
||||
var childInfo = child.GetDebugOperationInfo();
|
||||
operationInfo.Childs.Add(childInfo);
|
||||
}
|
||||
return operationInfo;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 排序接口实现
|
||||
|
||||
Reference in New Issue
Block a user