# GetSceneByBuildIndex(int)

> Override for customizing the behavior of the SceneManager.GetSceneByBuildIndex function.

## Definition

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

```csharp
protected virtual Scene GetSceneByBuildIndex(int buildIndex)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Build index as returned by GetNumScenesInBuildSettings.

### Returns

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