# GetSceneByBuildIndex(int)

> Get a Scene struct from a build index.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.SceneManagement](/engine/6000.5/script-reference/unityengine/scenemanagement.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static Scene GetSceneByBuildIndex(int buildIndex)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Build index as shown in the Build Settings window.

### Returns

| Type                                                                          | Description                                                               |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [Scene](/engine/6000.5/script-reference/unityengine/scenemanagement/scene.md) | A reference to the Scene, if valid. If not, an invalid Scene is returned. |

### Remarks

This method will return a valid Scene if a Scene has been added to the build settings at the given build index AND the Scene is loaded. If it has not been loaded yet the SceneManager cannot return a valid Scene.\
&#x20;Additional Resources: [SceneManager.GetSceneAt](/engine/6000.5/script-reference/unityengine/scenemanagement/scenemanager/getsceneat.md), GetBuildIndexBySceneName.
