Update README_CN.md

master
NKG丶MadLife 2022-10-25 12:10:28 +08:00 committed by GitHub
parent f6037d6c9b
commit 5602861dd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 29 deletions

View File

@ -20,38 +20,38 @@ UniTask
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## 目录
- [入门](https://github.com/wqaetly/UniTask#getting-started)
- [UniTask 和 AsyncOperation 的基础知识](https://github.com/wqaetly/UniTask#basics-of-unitask-and-asyncoperation)
- [异步取消和异常处理](https://github.com/wqaetly/UniTask#cancellation-and-exception-handling)
- [超时处理](https://github.com/wqaetly/UniTask#timeout-handling)
- [进度](https://github.com/wqaetly/UniTask#progress)
- [PlayerLoop](https://github.com/wqaetly/UniTask#playerloop)
- [async void 与 async UniTaskVoid 对比](https://github.com/wqaetly/UniTask#async-void-vs-async-unitaskvoid)
- [UniTaskTracker介绍](https://github.com/wqaetly/UniTask#unitasktracker)
- [拓展资源](https://github.com/wqaetly/UniTask#external-assets)
- [AsyncEnumerable 和 Async LINQ](https://github.com/wqaetly/UniTask#asyncenumerable-and-async-linq)
- [可等待的事件](https://github.com/wqaetly/UniTask#awaitable-events)
- [Channel](https://github.com/wqaetly/UniTask#channel)
- [单元测试](https://github.com/wqaetly/UniTask#for-unit-testing)
- [线程池限制](https://github.com/wqaetly/UniTask#threadpool-limitation)
- [IEnumerator.ToUniTask 限制](https://github.com/wqaetly/UniTask#ienumeratortounitask-limitation)
- [UnityEditor 相关](https://github.com/wqaetly/UniTask#for-unityeditor)
- [与原生Task API 比较](https://github.com/wqaetly/UniTask#compare-with-standard-task-api)
- [池化的配置](https://github.com/wqaetly/UniTask#pooling-configuration)
- [Profiler 上的分配](https://github.com/wqaetly/UniTask#allocation-on-profiler)
- [UniTaskSynchronizationContext](https://github.com/wqaetly/UniTask#unitasksynchronizationcontext)
- [API 参考](https://github.com/wqaetly/UniTask#api-references)
- [UPM Package](https://github.com/wqaetly/UniTask#upm-package)
- [通过 git URL 安装](https://github.com/wqaetly/UniTask#install-via-git-url)
- [通过 OpenUPM 安装](https://github.com/wqaetly/UniTask#install-via-openupm)
- [.NET Core](https://github.com/wqaetly/UniTask#net-core)
- [许可证](https://github.com/wqaetly/UniTask#license)
- [入门](https://github.com/Cysharp/UniTask#getting-started)
- [UniTask 和 AsyncOperation 的基础知识](https://github.com/Cysharp/UniTask#basics-of-unitask-and-asyncoperation)
- [异步取消和异常处理](https://github.com/Cysharp/UniTask#cancellation-and-exception-handling)
- [超时处理](https://github.com/Cysharp/UniTask#timeout-handling)
- [进度](https://github.com/Cysharp/UniTask#progress)
- [PlayerLoop](https://github.com/Cysharp/UniTask#playerloop)
- [async void 与 async UniTaskVoid 对比](https://github.com/Cysharp/UniTask#async-void-vs-async-unitaskvoid)
- [UniTaskTracker介绍](https://github.com/Cysharp/UniTask#unitasktracker)
- [拓展资源](https://github.com/Cysharp/UniTask#external-assets)
- [AsyncEnumerable 和 Async LINQ](https://github.com/Cysharp/UniTask#asyncenumerable-and-async-linq)
- [可等待的事件](https://github.com/Cysharp/UniTask#awaitable-events)
- [Channel](https://github.com/Cysharp/UniTask#channel)
- [单元测试](https://github.com/Cysharp/UniTask#for-unit-testing)
- [线程池限制](https://github.com/Cysharp/UniTask#threadpool-limitation)
- [IEnumerator.ToUniTask 限制](https://github.com/Cysharp/UniTask#ienumeratortounitask-limitation)
- [UnityEditor 相关](https://github.com/Cysharp/UniTask#for-unityeditor)
- [与原生Task API 比较](https://github.com/Cysharp/UniTask#compare-with-standard-task-api)
- [池化的配置](https://github.com/Cysharp/UniTask#pooling-configuration)
- [Profiler 上的分配](https://github.com/Cysharp/UniTask#allocation-on-profiler)
- [UniTaskSynchronizationContext](https://github.com/Cysharp/UniTask#unitasksynchronizationcontext)
- [API 参考](https://github.com/Cysharp/UniTask#api-references)
- [UPM Package](https://github.com/Cysharp/UniTask#upm-package)
- [通过 git URL 安装](https://github.com/Cysharp/UniTask#install-via-git-url)
- [通过 OpenUPM 安装](https://github.com/Cysharp/UniTask#install-via-openupm)
- [.NET Core](https://github.com/Cysharp/UniTask#net-core)
- [许可证](https://github.com/Cysharp/UniTask#license)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
入门
---
通过[UniTask/releases](https://github.com/Cysharp/UniTask/releases)页面中提供的[UPM 包](https://github.com/wqaetly/UniTask#upm-package)或资产包 ( `UniTask.*.*.*.unitypackage`)安装。
通过[UniTask/releases](https://github.com/Cysharp/UniTask/releases)页面中提供的[UPM 包](https://github.com/Cysharp/UniTask#upm-package)或资产包 ( `UniTask.*.*.*.unitypackage`)安装。
```csharp
// 使用UniTask所需的命名空间
@ -149,9 +149,9 @@ UniTask 提供了三种模式的扩展方法。
* .ToUniTask(IProgress, PlayerLoopTiming, CancellationToken);
```
`WithCancellation`是`ToUniTask`的简化版本,两者都返回`UniTask`。有关cancellation的详细信息请参阅[取消和异常处理](https://github.com/wqaetly/UniTask#cancellation-and-exception-handling)部分。
`WithCancellation`是`ToUniTask`的简化版本,两者都返回`UniTask`。有关cancellation的详细信息请参阅[取消和异常处理](https://github.com/Cysharp/UniTask#cancellation-and-exception-handling)部分。
> 注意await 会在 PlayerLoop 执行await对象的相应native生命周期方法时返回如果条件满足的话而 WithCancellation 和 ToUniTask 是从指定的 PlayerLoop 生命周期执行时返回。有关 PlayLoop生命周期 的详细信息,请参阅:[PlayerLoop](https://github.com/wqaetly/UniTask#playerloop)部分。
> 注意await 会在 PlayerLoop 执行await对象的相应native生命周期方法时返回如果条件满足的话而 WithCancellation 和 ToUniTask 是从指定的 PlayerLoop 生命周期执行时返回。有关 PlayLoop生命周期 的详细信息,请参阅:[PlayerLoop](https://github.com/Cysharp/UniTask#playerloop)部分。
> 注意: AssetBundleRequest 有`asset`和`allAssets`,默认 await 返回`asset`。如果你想得到`allAssets`,你可以使用`AwaitForAllAssets()`方法。