# CloseScene(Scene, bool)

> Close the Scene. If removeScene flag is true, the closed Scene will also be removed from EditorSceneManager.

## Definition

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

```csharp
public static bool CloseScene(Scene scene, bool removeScene)
```

### Parameters

**** (\[Scene]\(/engine/6000.7/script-reference/unityengine/scenemanagement/scene)): The Scene to be closed/removed.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool flag to indicate if the Scene should be removed after closing.

### Returns

| Type                                                          | Description                                  |
| ------------------------------------------------------------- | -------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the Scene is closed/removed. |

### Examples

```csharp
using UnityEngine;
using System.Collections;
using UnityEditor.SceneManagement;
using UnityEngine.SceneManagement;

public class ExampleClass
{
    void Example()
    {
        EditorSceneManager.CloseScene(SceneManager.GetSceneByName("Title Screen"), true);
    }
}
```
