mirror of https://github.com/tuyoogame/YooAsset
Update UniTask Sample
parent
314c5cd86a
commit
c5ca825b25
|
@ -1,9 +1,6 @@
|
|||
# UniTask 扩展
|
||||
|
||||
[仓库链接](https://github.com/Cysharp/UniTask)
|
||||
- 请去下载对应的源码,并删除此目录最后的波浪线
|
||||
- 在项目的 `asmdef` 文件中添加对 `UniTask.YooAsset` 的引用
|
||||
- 在 UniTask `_InternalVisibleTo.cs` 文件中增加 `[assembly: InternalsVisibleTo("UniTask.YooAsset")]` 后即可使用
|
||||
这里为了照顾新手使用,做了一些妥协,有定制需求的需要手动调整一下
|
||||
|
||||
## 代码示例
|
||||
|
||||
|
@ -20,4 +17,22 @@ public async UniTask Example(IProgress<float> progress = null, PlayerLoopTiming
|
|||
go.transform.localPosition = Vector3.zero;
|
||||
go.transform.localScale = Vector3.one;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
## 初学者教程
|
||||
|
||||
**如果你弄不明白 asmdef 文件到底是啥,就按照下发内容操作**
|
||||
|
||||
- 将 `Samples/UniTask Sample/UniTask` 文件夹拷入游戏中
|
||||
- 如果项目有 `asmdef`,则引用 `UniTask` 和 `YooAsset`,如果没有,就不用关心这一步
|
||||
|
||||
|
||||
## 项目定制教程
|
||||
|
||||
- 请去下载 [UniTask](https://github.com/Cysharp/UniTask) 源码
|
||||
- 注意不要用 `Sample` 里面的 `UniTask` 这个是专门给新手定制的
|
||||
- 将 `Samples/UniTask Sample/UniTask/Runtime/External/YooAsset` 文件夹拷贝到 `UniTask/Runtime/External/YooAsset` 中
|
||||
- 创建 `UniTask.YooAsset.asmdef` 文件
|
||||
- 添加 `UniTask` 和 `YooAsset` 的引用
|
||||
- 在 UniTask `_InternalVisibleTo.cs` 文件中增加 `[assembly: InternalsVisibleTo("UniTask.YooAsset")]` 后即可使用
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"name": "UniTask.YooAsset",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:e34a5702dd353724aa315fb8011f08c3",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
8
Assets/YooAsset/Samples~/UniTask Sample/UniTask/Runtime/External/YooAsset.meta
vendored
Normal file
8
Assets/YooAsset/Samples~/UniTask Sample/UniTask/Runtime/External/YooAsset.meta
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8a55ef7d1bba14cc982b478d482c4461
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,7 +1,9 @@
|
|||
{
|
||||
"name": "UniTask",
|
||||
"rootNamespace": "",
|
||||
"references": [],
|
||||
"references": [
|
||||
"GUID:e34a5702dd353724aa315fb8011f08c3"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
|
|
Loading…
Reference in New Issue