unity笔记

开启协同程序,相当于c#的后台线程

使用系统方法 startcoroutine(Hello());

 

  IEnumerator  Hello()

{

print("每隔一秒打声招呼")

yield return new waitforseconds(1f); //每过一秒钟执行一次

}

 

使用  WWW获取信息

WWW test=new WWW("http://localhost:3453/gettime.ashx");

print(test.text);

posted @ 2015-07-30 07:20  凌心缘  阅读(199)  评论(0编辑  收藏  举报