CloseScene(Scene, bool)
Close the Scene. If removeScene flag is true, the closed Scene will also be removed from EditorSceneManager.
Read time 1 minuteLast updated 20 days ago
Definition
- Type: Method
- Namespace: UnityEditor.SceneManagement
- Assembly: UnityEditor.CoreModule
public static bool CloseScene(Scene scene, bool removeScene)
Parameters
Returns
Type | Description |
|---|---|
| bool | Returns true if the Scene is closed/removed. |
Examples
using UnityEngine;using System.Collections;using UnityEditor.SceneManagement;using UnityEngine.SceneManagement;public class ExampleClass{ void Example() { EditorSceneManager.CloseScene(SceneManager.GetSceneByName("Title Screen"), true); }}