Class SceneManagerState | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class SceneManagerState

    Serializable object that can be used to save and restore the state of the editor scene manager.

    Inheritance
    System.Object
    SceneManagerState
    Namespace: UnityEditor.AddressableAssets.Build
    Syntax
    [Serializable]
    public class SceneManagerState

    Methods

    AddScenesForPlayMode(List<EditorBuildSettingsScene>)

    Adds a set of scenes to the scene list for use in editor play mode.

    Declaration
    public static void AddScenesForPlayMode(List<EditorBuildSettingsScene> playModeScenes)
    Parameters
    Type Name Description
    System.Collections.Generic.List<EditorBuildSettingsScene> playModeScenes

    The scenes to add to the editor scenes list.

    Record(String)

    Record the state of the EditorSceneManager and save to a JSON file.

    Declaration
    public static void Record(string path = "Library/com.unity.addressables/SceneManagerState.json")
    Parameters
    Type Name Description
    System.String path

    The path to save the recorded state.

    Restore(String, Boolean)

    Restore the state of the EditorSceneManager.

    Declaration
    public static void Restore(string path = "Library/com.unity.addressables/SceneManagerState.json", bool restoreSceneManagerSetup = false)
    Parameters
    Type Name Description
    System.String path

    The path to load the state data from. This file is generated by calling SceneManagerState.Record.

    System.Boolean restoreSceneManagerSetup

    If true, the recorded active scenes are restored. EditorBuildSettings.scenes are always restored.

    Back to top Copyright © 2015-2018 Unity
    Generated by DocFX