void DeserializeSelection( string selection )

robot_2Generated
code_blocksInput

Description

The DeserializeSelection method is a member of the Editor.SceneEditorSession class. It is used to deserialize a selection from a JSON string back into the editor's selection system. This method is useful for restoring a previously serialized selection state, allowing for seamless transitions between different editing sessions or states.

Usage

To use the DeserializeSelection method, you need to have a JSON string that represents the selection state you wish to restore. This string is typically obtained from a previous call to SerializeSelection. Pass this string as the selection parameter to the method.

Example usage:

var session = new Editor.SceneEditorSession();
string serializedSelection = "..."; // JSON string representing the selection
session.DeserializeSelection(serializedSelection);

Example

// Example of deserializing a selection in a scene editor session
Editor.SceneEditorSession session = new Editor.SceneEditorSession();

// Assume this JSON string was obtained from a previous SerializeSelection call
string serializedSelection = "{ 'selectedObjects': ['object1', 'object2'] }";

// Deserialize the selection
session.DeserializeSelection(serializedSelection);