协程执行顺序测试备份
using UnityEngine;
using System.Collections;
public class test1 : MonoBehaviour {
// Use this for initialization
void Start () {
StartCoroutine(testc());
}
private IEnumerator testc()
{
Debug.Log("test enter");
//fun();
StartCoroutine(testc2());
//yield return StartCoroutine(testc2());
Debug.Log("test after fun");
yield return new WaitForSeconds(1);
Debug.Log("test over");
}
private void fun()
{
Debug.Log("fun enter");
StartCoroutine(testc2());
Debug.Log("fun over");
}
private IEnumerator testc2()
{
Debug.Log("test2 enter1");
Debug.Log("test2 enter2");
Debug.Log("test2 enter3");
yield return new WaitForSeconds(2);
Debug.Log("test2 over");
}
// Update is called once per frame
void Update () {
}
}
上一篇: SmartRefreshLayout自定义下拉刷新动画
下一篇: ListView通用泛型适配器