Version: 2021.3
Method group is Obsolete

Application.LoadLevelAsync

マニュアルに切り替える
Obsolete public static AsyncOperation LoadLevelAsync (int index);
Obsolete public static AsyncOperation LoadLevelAsync (string levelName);

説明

バックグラウンドで非同期でレベルを読み込みます。

Unity will completely load all assets and all objects in the Scene in a background loading thread. This allows you to load new levels while still playing the current one, show a progress bar or create a completely streaming world where you constantly load and unload different parts of the world based on the player position, without any hiccups in game play.

isDone variable from the resulting AsyncOperation can be used to query if the level load has completed. The result of a LoadLevelAsync can also be used to yield in a coroutine.

When building a player Unity automatically optimizes assets in such a way that LoadLevelAsync will load them from disk linearly to avoid seek times. Note that background loading performance in the Unity Editor is much lower than in the standalone build. In the Editor you might also get more loading hiccups than in the player.

See Execution Order of Event Functions for more information regarding the calling sequence once a level is loaded. See Also: AsyncOperation, Application.backgroundLoadingPriority, Application.LoadLevel, Application.LoadLevelAdditive, Application.LoadLevelAdditiveAsync.