Class SceneManagerState
Serializable object that can be used to save and restore the state of the editor scene manager.
Inheritance
System.Object
SceneManagerState
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: UnityEditor.AddressableAssets
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. |