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));

 

 

 

posted on 2018-08-28 14:41  Sweet小马  阅读(148)  评论(0编辑  收藏  举报

导航