Class SceneManagement
An interface for manipulating Scenes in the context of TimelineSequence.
Namespace: UnityEditor.Sequences
Syntax
public class SceneManagement : object
Methods
AddNewScene(TimelineSequence)
Creates a new empty Scene and links it with a SceneActivationTrack in the given Sequence.
Declaration
public static bool AddNewScene(TimelineSequence sequence)
Parameters
Type | Name | Description |
---|---|---|
TimelineSequence | sequence | The Sequence you want the new Scene to belong to. |
Returns
Type | Description |
---|---|
Boolean | True if the operation has succeeded. False if the Editor could not save the new Scene in the project. |
CloseScene(String)
Closes the Scene located at the specified path.
Declaration
public static void CloseScene(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | Path to the Scene, relative to the project folder. |
IsLoaded(String)
Indicates if the Scene located at the specified path is already loaded or not in the Hierarchy.
Declaration
public static bool IsLoaded(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | Path to the Scene, relative to the project folder. |
Returns
Type | Description |
---|---|
Boolean | True if the Scene located at |
OpenAllScenes(TimelineSequence, Boolean)
Opens all Scenes referenced through a SceneActivationTrack in the specified TimelineSequence.
Declaration
public static void OpenAllScenes(TimelineSequence sequence, bool deactivate = false)
Parameters
Type | Name | Description |
---|---|---|
TimelineSequence | sequence | The Sequence you want to open all related activatable Scenes from. |
Boolean | deactivate | Set to true to disable the root GameObjects of the loaded Scenes. Default value: false. |
OpenScene(String, Boolean)
Opens the Scene located at the specified path in
Declaration
public static void OpenScene(string path, bool deactivate = false)
Parameters
Type | Name | Description |
---|---|---|
String | path | Path to the Scene, relative to the project folder. |
Boolean | deactivate | Set to true to disable the root GameObjects of the loaded Scenes. Default value: false. |