unity IEnumerator 协同程序
2013-09-30 11:12
393 查看
中断语句的使用
do等待2秒后执行后面的语句
先执行do等待都执行结束再执行其他的
IEnumerator Awake() { yield return new WaitForSeconds(5.0F); }
do等待2秒后执行后面的语句
IEnumerator Do() { print("Do now"); yield return new WaitForSeconds(2); print("Do 2 seconds later"); } void Awake() { Do(); print("This is printed immediately"); }
先执行do等待都执行结束再执行其他的
IEnumerator Do() { print("Do now"); yield return new WaitForSeconds(2); print("Do 2 seconds later"); } IEnumerator Awake() { yield return StartCoroutine("Do"); print("Also after 2 seconds"); print("This is after the Do coroutine has finished execution"); }
相关文章推荐
- 1.关于Unity -Vuforia -Android 开发 ,平台的搭建(极品菜鸟完整版)
- Unity 跑酷Demo难题总结
- (番外篇) 高通 AR Unity 虚拟按钮 -源于 官网
- Unity3d Shader开发(三)Pass(Blending )
- unityGUI下拉菜单实现代码
- Unity3d Shader开发(三)Pass(Alpha testing )
- Unity3d Shader开发(三)Pass(Fog )
- Nessus home与Nexpose community 对比
- Unity3d Shader开发(三)Pass(Texturing )
- unity 协同程序有多线程效果
- unity 坐标处理
- unity 锯齿
- Unity3d使用delegate
- Unity3D基本原理
- unity3d简单血条的制作方法
- Unity 世界坐标转换到NGUI坐标
- unity动态加载远程资源
- unity载入外部视频脚本
- unity的内存管理
- Unity3D入门(一):环境搭建