docs.unity3d.com
    Show / Hide Table of Contents

    Class SceneManagement

    An interface for manipulating Scenes in the context of TimelineSequence.

    Inheritance
    Object
    SceneManagement
    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 path is already loaded in the Hierarchy. False otherwise.

    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.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023