YooAsset/Assets/UniTask.YooAsset~
L 3c38fe6155 Update UniTask.YooAsset README 2022-07-13 15:29:23 +08:00
..
AsyncOperationBaseExtensions.cs Fix Unity 2020 IL2Cpp UniTask Bug 2022-07-02 12:33:59 +08:00
AsyncOperationBaseExtensions.cs.meta Add AsyncOperationBaseExtensions UniTask Support 2022-05-08 11:04:55 +08:00
OperationHandleBaseExtensions.cs Fix Unity 2020 IL2Cpp UniTask Bug 2022-07-02 12:33:59 +08:00
OperationHandleBaseExtensions.cs.meta Add UniTask Support 2022-04-25 15:35:11 +08:00
README.md Update UniTask.YooAsset README 2022-07-13 15:29:23 +08:00
README.md.meta Add AsyncOperationBaseExtensions UniTask Support 2022-05-08 11:04:55 +08:00
UniTask.YooAsset.asmdef Add UniTask Support 2022-04-25 15:35:11 +08:00
UniTask.YooAsset.asmdef.meta Add UniTask Support 2022-04-25 15:35:11 +08:00

README.md

UniTask 扩展

仓库链接

  • 请去下载对应的源码,并删除此目录最后的波浪线
  • 在项目的 asmdef 文件中添加对 UniTask.YooAsset 的引用
  • 在 UniTask _InternalVisibleTo.cs 文件中增加 [assembly: InternalsVisibleTo("UniTask.YooAsset")] 后即可使用

代码示例

var handle = YooAssets.LoadAssetAsync<GameObject>("Assets/Res/Prefabs/TestImg.prefab");

await handle.ToUniTask();

var obj = handle.AssetObject as GameObject;
var go  = Instantiate(obj, transform);

go.transform.localPosition = Vector3.zero;
go.transform.localScale    = Vector3.one;