From f9ac8ab51bfb11e1ecf29200def260d82ba9cdbd Mon Sep 17 00:00:00 2001 From: hevinci Date: Thu, 24 Mar 2022 21:34:34 +0800 Subject: [PATCH] Update document --- Docs/CodeTutorial3.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Docs/CodeTutorial3.md b/Docs/CodeTutorial3.md index 61e39f3..c468d85 100644 --- a/Docs/CodeTutorial3.md +++ b/Docs/CodeTutorial3.md @@ -37,11 +37,7 @@ void Handle_Completed(AssetOperationHandle handle) ```` ````C# // 协程加载方式 -void Start() -{ - this.StartCoroutine(AsyncLoad()); -} -IEnumerator AsyncLoad() +IEnumerator Start() { AssetOperationHandle handle = YooAssets.LoadAssetAsync("Audio/bgMusic.mp3"); yield return handle; @@ -51,10 +47,6 @@ IEnumerator AsyncLoad() ````C# // Task加载方式 async void Start() -{ - await AsyncLoad(); -} -async Task AsyncLoad() { AssetOperationHandle handle = YooAssets.LoadAssetAsync("Audio/bgMusic.mp3"); await handle.Task;