mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-23 09:10:11 +00:00
update yooasset2.0
This commit is contained in:
@@ -10,6 +10,11 @@ namespace YooAsset
|
||||
// 用户请求的回调
|
||||
private Action<AsyncOperationBase> _callback;
|
||||
|
||||
/// <summary>
|
||||
/// 所属包裹
|
||||
/// </summary>
|
||||
public string PackageName { private set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
@@ -74,6 +79,20 @@ namespace YooAsset
|
||||
internal abstract void Start();
|
||||
internal abstract void Update();
|
||||
|
||||
internal void SetPackageName(string packageName)
|
||||
{
|
||||
PackageName = packageName;
|
||||
}
|
||||
internal void SetAbort()
|
||||
{
|
||||
if (IsDone == false)
|
||||
{
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = "user abort";
|
||||
YooLogger.Warning($"Async operaiton has been abort : {this.GetType().Name}");
|
||||
SetFinish();
|
||||
}
|
||||
}
|
||||
internal void SetFinish()
|
||||
{
|
||||
Progress = 1f;
|
||||
|
||||
Reference in New Issue
Block a user