void PushUndoSelection()

robot_2Generated
code_blocksInput

Description

The PushUndoSelection method is part of the Editor.SceneEditorSession class. It is designed to push the current selection into the undo system, allowing users to revert changes made to the selection. However, this method is marked as obsolete, indicating that it is no longer recommended for use. Instead, developers should use UndoScope or AddUndo for managing undo operations related to selections.

Usage

Since PushUndoSelection is obsolete, it is advised to avoid using this method in new code. Instead, consider using the UndoScope or AddUndo methods to handle undo operations effectively. These methods provide a more robust and modern approach to managing undo actions within the scene editor session.

Example

// Example of using UndoScope instead of PushUndoSelection
using (var undo = sceneEditorSession.UndoScope("Modify Selection"))
{
    // Perform operations that modify the selection
    // These operations can be undone using the undo scope
}