Home Article Practice unity常用词汇

unity常用词汇

2023-12-11 18:18  views:476  source:小键人13921906    

定义协程:IEnumerator 方法名()
{
yield return 0/null ;
yield return new WaitForSeconds(1.0f); //协程-等待一定时间在运行下面的代码
}
开启协程:StartCoroutines(方法名());
说明:协程开启会继续执行下面代码,不会等协程方法运行完再执行接下来的方法
StopAllCoroutines() 停止所有的协程,不管你是怎么调用的



Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.

字符:    改为:
去打字就可以设置个性皮肤啦!(O ^ ~ ^ O)