Unity - Scripting API: Application.CanStreamedLevelBeLoaded
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Declaration
public static bool CanStreamedLevelBeLoaded(int levelIndex);
Description
Checks if the built scene can be loaded.
Test if a scene with the provided index exists in the Player build. Returns true if the index value is greater than or equal to zero, and less than SceneManager.sceneCountInBuildSettings.
Declaration
public static bool CanStreamedLevelBeLoaded(string levelName);
Description
Checks if the built scene can be loaded.
Verify if the named scene exists in either the Player build or currently loaded AssetBundles. Additional resources: SceneManager