void DeleteSelection()

book_4_sparkGenerated
code_blocksInput

Description

The DeleteSelection method is a public instance method of the GraphView class within the Editor.NodeEditor namespace. This method is used to delete the currently selected nodes or elements within the graph view. It is typically used in node-based editors where users can select multiple nodes and perform operations on them, such as deletion.

Usage

To use the DeleteSelection method, ensure that you have a valid instance of GraphView. Call the method on this instance to delete the currently selected nodes or elements. This operation is irreversible, so ensure that the selection is correct before invoking this method.

Example

// Assuming 'graphView' is an instance of Editor.NodeEditor.GraphView

// Delete the currently selected nodes or elements
graphView.DeleteSelection();