LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

This version of Unity is unsupported.

SceneUtility.GetScenePathByBuildIndex

public static string GetScenePathByBuildIndex(int buildIndex);

Returns

string Scene path (e.g "Assets/Scenes/Scene1.unity").

Description

Get the scene path from a build index.

The build index refers to the index into the list of scenes as specified in the Build Settings window.