parent
ef1acdc3d1
commit
608f401a80
|
@ -62,7 +62,7 @@ namespace YooAsset
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_setPositionRotation)
|
if (_setPositionRotation)
|
||||||
{
|
{
|
||||||
if (_parent == null)
|
if (_parent == null)
|
||||||
Result = Object.Instantiate(_handle.AssetObject as GameObject, _position, _rotation);
|
Result = Object.Instantiate(_handle.AssetObject as GameObject, _position, _rotation);
|
||||||
|
@ -81,5 +81,14 @@ namespace YooAsset
|
||||||
Status = EOperationStatus.Succeed;
|
Status = EOperationStatus.Succeed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public override void Cancel()
|
||||||
|
{
|
||||||
|
if (IsDone == false)
|
||||||
|
{
|
||||||
|
_steps = ESteps.Done;
|
||||||
|
Status = EOperationStatus.Failed;
|
||||||
|
Error = $"User cancelled !";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -81,6 +81,14 @@ namespace YooAsset
|
||||||
_taskCompletionSource.TrySetResult(null);
|
_taskCompletionSource.TrySetResult(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 取消异步操作
|
||||||
|
/// </summary>
|
||||||
|
public virtual void Cancel()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException("Can not cancel operation !");
|
||||||
|
}
|
||||||
|
|
||||||
#region 异步编程相关
|
#region 异步编程相关
|
||||||
bool IEnumerator.MoveNext()
|
bool IEnumerator.MoveNext()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue