Class SceneManagerState
Serializable object that can be used to save and restore the state of the editor scene manager.
Inherited Members
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
String | path | The path to load the state data from. This file is generated by calling SceneManagerState.Record. |
Boolean | restoreSceneManagerSetup | If true, the recorded active scenes are restored. EditorBuildSettings.scenes are always restored. |