unity 中的协程
Posted sweetxiaoma
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了unity 中的协程相关的知识,希望对你有一定的参考价值。
//The coroutine will continue after all Update functionshave been calledon the next frame. yield return 1; //Continue after a specified time delay, after all Update functions have been called for the frame. yield return new WaitForSeconds(2); // Continue after all FixedUpdate has been called on all scripts. yield return new WaitForFixedUpdate(); // after a WWW download has completed yield return new WWW("url"); //Chains the coroutine, and will wait for the MyFunc coroutine to complete first. yield return StartCoroutine(LoadPic(urls));
以上是关于unity 中的协程的主要内容,如果未能解决你的问题,请参考以下文章