update UniTask sample
parent
f4a3fcece8
commit
15a605b677
|
@ -98,6 +98,9 @@ namespace Cysharp.Threading.Tasks
|
||||||
case SubAssetsOperationHandle sub_asset_handle:
|
case SubAssetsOperationHandle sub_asset_handle:
|
||||||
sub_asset_handle.Completed += result.SubContinuation;
|
sub_asset_handle.Completed += result.SubContinuation;
|
||||||
break;
|
break;
|
||||||
|
case RawFileOperationHandle raw_file_handle:
|
||||||
|
raw_file_handle.Completed += result.RawFileContinuation;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
switch (handle)
|
switch (handle)
|
||||||
|
@ -111,6 +114,9 @@ namespace Cysharp.Threading.Tasks
|
||||||
case SubAssetsOperationHandle sub_asset_handle:
|
case SubAssetsOperationHandle sub_asset_handle:
|
||||||
sub_asset_handle.Completed += result.continuationAction;
|
sub_asset_handle.Completed += result.continuationAction;
|
||||||
break;
|
break;
|
||||||
|
case RawFileOperationHandle raw_file_handle:
|
||||||
|
raw_file_handle.Completed += result.continuationAction;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
token = result.core.Version;
|
token = result.core.Version;
|
||||||
|
@ -135,6 +141,12 @@ namespace Cysharp.Threading.Tasks
|
||||||
handle.Completed -= SubContinuation;
|
handle.Completed -= SubContinuation;
|
||||||
BaseContinuation();
|
BaseContinuation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RawFileContinuation(RawFileOperationHandle handle)
|
||||||
|
{
|
||||||
|
handle.Completed -= RawFileContinuation;
|
||||||
|
BaseContinuation();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
private void BaseContinuation()
|
private void BaseContinuation()
|
||||||
|
@ -170,6 +182,9 @@ namespace Cysharp.Threading.Tasks
|
||||||
case SubAssetsOperationHandle sub_asset_handle:
|
case SubAssetsOperationHandle sub_asset_handle:
|
||||||
sub_asset_handle.Completed -= continuationAction;
|
sub_asset_handle.Completed -= continuationAction;
|
||||||
break;
|
break;
|
||||||
|
case RawFileOperationHandle raw_file_handle:
|
||||||
|
raw_file_handle.Completed -= continuationAction;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseContinuation();
|
BaseContinuation();
|
||||||
|
|
Loading…
Reference in New Issue