using UnityEngine; using System.Threading.Tasks; public class Test: MonoBehaviour { private void Start () { delaySayHello(200);//延时200毫秒输出"Hello" } private async void delaySayHello(int ms){ await Task.Delay(ms); Debug.Log("Hello"); } } 标签 async await