# GetSceneByLoadableSceneId(LoadableSceneId)

> The Scene handle for a scene that is already loaded and originated from the given LoadableSceneId.

## Definition

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

```csharp
public static Scene GetSceneByLoadableSceneId(LoadableSceneId loadableSceneId)
```

### Parameters

**** (\[LoadableSceneId]\(/engine/6000.7/script-reference/unity/loading/loadablesceneid)): The identifier for the specific scene asset to retrieve.

### Returns

| Type                                                                          | Description                                                                                                                                                                                                                               |
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Scene](/engine/6000.7/script-reference/unityengine/scenemanagement/scene.md) | A valid [Scene](/engine/6000.7/script-reference/unityeditor/searchservice/scene.md) when a matching scene instance is currently loaded; otherwise an invalid [Scene](/engine/6000.7/script-reference/unityeditor/searchservice/scene.md). |

### Remarks

This is only meaningful after [SceneManager.LoadSceneAsync](/engine/6000.7/script-reference/unityengine/scenemanagement/scenemanager/loadsceneasync.md) (or an equivalent load path) has completed while the owning content directory was registered with [ContentLoadManager.RegisterContentDirectory](/engine/6000.7/script-reference/unity/loading/contentloadmanager/registercontentdirectory.md).

### Examples

```csharp
using System.Threading.Tasks;
using Unity.Loading;
using UnityEngine;
using UnityEngine.SceneManagement;

public class GetSceneByLoadableSceneIdExample
{
    // Example showing how to get the Scene handle after loading and activate it
    async Task Example(LoadableSceneId lobbySceneId)
    {
        AsyncOperation op = SceneManager.LoadSceneAsync(lobbySceneId, new LoadSceneParameters(LoadSceneMode.Additive));
        while (!op.isDone)
            await Awaitable.NextFrameAsync();

        Scene runtimeScene = SceneManager.GetSceneByLoadableSceneId(lobbySceneId);
        if (runtimeScene.IsValid())
            SceneManager.SetActiveScene(runtimeScene);
    }
}
```
