void DuplicateSelection()

book_4_sparkGenerated
code_blocksInput

Description

The DuplicateSelection method in the GraphView class is used to duplicate the currently selected nodes within the node editor. This method is part of the Editor.NodeEditor namespace and provides functionality to create copies of selected nodes, allowing for quick replication and modification of node setups.

Usage

To use the DuplicateSelection method, ensure that you have a valid instance of GraphView and that there are nodes currently selected in the editor. Invoking this method will create duplicates of the selected nodes at a specified offset, typically slightly offset from the original to avoid overlap.

Example

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

// Duplicate the currently selected nodes
graphView.DuplicateSelection();