반응형
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Threading.Tasks;
public class Example : MonoBehaviour
{
int number = 0;
private void Start()
{
Task.Run(() => Testing());
}
async Task Testing()
{
await Task.Run(() =>
{
while(number < 500)
{
number++;
}
});
await Task.Delay(5000);
}
}
반응형