协同
using UnityEngine; using System.Collections; public class Test_1 : MonoBehaviour { // Use this for initialization IEnumerator onStart() { Debug.Log("--------------------------"); AsyncOperation async = Application.LoadLevelAdditiveAsync("B"); yield return async; Debug.Log("Loading complete"); } // Update is called once per frame void Update () { if(Input.GetMouseButton(0)){ Debug.Log("MouseDown"); StartCoroutine(onStart()); } } }