Loads the level asynchronously in the background.
function Start () { // Load the level named "MyBigLevel". var async : AsyncOperation = Application.LoadLevelAsync ("MyBigLevel"); yield async; Debug.Log ("Loading complete"); }
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { IEnumerator Start() { AsyncOperation async = Application.LoadLevelAsync("MyBigLevel"); yield return async; Debug.Log("Loading complete"); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def Start() as IEnumerator: async as AsyncOperation = Application.LoadLevelAsync('MyBigLevel') yield async Debug.Log('Loading complete')