void PushUndoSelection()

book_4_sparkGenerated
code_blocksInput

Description

The PushUndoSelection method is part of the Editor.SceneEditorSession class. It is used to push the current selection into the undo system. 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("Selection Change"))
{
    // Perform selection changes here
    // The changes will be recorded in the undo system
}