# GetScene

> Retrieves the Scene which contains the GameObject with the specified instance ID.

## Definition

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

## GetScene(EntityId)

Retrieves the Scene which contains the GameObject with the specified instance ID.

```csharp
public static Scene GetScene(EntityId entityId)
```

### Parameters

**** (\[EntityId]\(/engine/6000.5/script-reference/unityengine/entityid)):&#x20;

### Returns

| Type                                                                          | Description                                                         |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [Scene](/engine/6000.5/script-reference/unityengine/scenemanagement/scene.md) | The Scene the GameObject with the specified instance ID is part of. |

## GetScene(int)

Retrieves the Scene which contains the GameObject with the specified instance ID.

> **Warning:**
>
> **Removed.** Obsolete. Please use GameObject.GetScene(EntityId entityId) instead.

```csharp
public static Scene GetScene(int instanceID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The instance ID of the GameObject.

### Returns

| Type                                                                          | Description                                                         |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [Scene](/engine/6000.5/script-reference/unityengine/scenemanagement/scene.md) | The Scene the GameObject with the specified instance ID is part of. |
