Last active
October 20, 2019 14:51
-
-
Save baobao/91f4a891e926b0505c93fb5cbdb651e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using UnityEngine; | |
public class AsyncAwaitWait : MonoBehaviour | |
{ | |
async void Start() | |
{ | |
// 5秒待機する | |
await ExecuteWait(); | |
Debug.Log("Complete"); | |
} | |
async Task ExecuteWait() | |
{ | |
await Task.Delay(5000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment