内容来源:up主游戏石匠,仅作笔记,推荐关注该up主。 UniTask是Github上的开源库,为Unity提供一个高性能异步方案,可以代替协程实现异步操作,中文文档 优点: 不需要依赖于MonoBehaviour,性能比协程好 可以进行 try catch,取消操作 默认使用主线程,与Unity协同,而C#得Task是在另一个线程中运行 0GC 安装 通过Package Manager安装,输入https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask 导入后可能的报错 如果导入后报错提示 ‘ArrayPool’ does not contain a definition for ‘Shared’...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile