Skip to content

Instantly share code, notes, and snippets.

@baobao
Last active October 20, 2019 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baobao/91f4a891e926b0505c93fb5cbdb651e6 to your computer and use it in GitHub Desktop.
Save baobao/91f4a891e926b0505c93fb5cbdb651e6 to your computer and use it in GitHub Desktop.
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