测试1: using UnityEngine; using System.Collections; public class test1 : MonoBehaviour { // Use this for initialization void Start () { Debug.Log("in start " + Time.time.ToString()); StartCoroutine(callYieldFunction()); //必须要用StartCoroutine Debug.…
Unity中的Coroutine(协程) 估计熟悉Unity的人看过或者用过StartCoroutine() 假设我们在场景中有一个UGUI组件, Image: 将以下代码绑定到Image using UnityEngine; using System.Collections; using System.Threading; using UnityEngine.UI; public class CoroutineDemo : MonoBehaviour { // Use this for ini…