-
Notifications
You must be signed in to change notification settings - Fork 10
异步任务
Hiram edited this page Apr 2, 2018
·
1 revision
- 异步任务
- 获取网络Ping值
new AsyncRepeatingPingTask(x => { string log = "current ping is: " + x; }, "ip", 1);
- 定时重复执行
new AsyncRepeatingTask(() => { string log = "execute"; }, 1);
- 异步加载
new AsyncResourceLoadTask((x)=> { var go= UnityEngine.Object.Instantiate(x) as GameObject; },"path");
- 定时执行
new AsyncTimeTask(()=> { string log = "execute"; },1);
- 检测变量值变化
bool test = false; void Main() { new AsyncWaitTrueTask(() => { UnityEngine.Debug.LogError("true"); }, ref test); }
- WWW下载
new AsyncWWWTask((x) => { string log = x.bytes.ToString(); }, "url");
- 获取网络Ping值