unity3d 定时循环
2015-10-27 21:30
295 查看
function Start () {
StartCoroutine("DoSomething");
}
function DoSomething () {
while (true) {
//需要重复执行的代码就放于在此处
print("DoSomething Loop");
//设置间隔时间为10秒
yield WaitForSeconds (10);
}
}
StartCoroutine("DoSomething");
}
function DoSomething () {
while (true) {
//需要重复执行的代码就放于在此处
print("DoSomething Loop");
//设置间隔时间为10秒
yield WaitForSeconds (10);
}
}
相关文章推荐
- unity3d assetbundle打包策略
- Unity AssetBundle爬坑手记
- Unity脚本周期关系
- Unity3D 事件回调
- Unity3D 第八章 实例化
- Unity3D 第二章 常用操作
- Unity3D内部脚本编程入门
- XRay5
- Unity3d 游戏场景优化 第一章
- Unity3d 游戏场景优化 第二章
- Unity3d 游戏场景优化 第三章
- Unity界面入门教程
- Unity脚本入门
- Unity3D 第十二章 性能最优化
- XRay4
- Unity3D研究院之Assetbundle的实战(六十三)
- XRay3
- Unity3D研究院之Assetbundle的原理(六十一)
- Unity-- 一些功能转载
- Unity3D研究院之将场景导出XML或JSON或二进制并且解析还原场景(四十)