Description
The Direction
property of the ConnectionHandleConfig
struct in the Editor.NodeEditor
namespace specifies the direction in which a connection handle can be dragged. This property is of type DragDirection
, which is an enumeration that defines possible drag directions for node connections within the editor.
Usage
Use the Direction
property to determine or set the allowable drag direction for a connection handle in a node editor. This can be useful when configuring how connections between nodes should behave in terms of user interaction.
Example
// Example of setting the Direction property
ConnectionHandleConfig config = new ConnectionHandleConfig();
config.Direction = DragDirection.Horizontal;
// Example of getting the Direction property
DragDirection currentDirection = config.Direction;
// Use the direction to perform logic based on the drag direction
if (currentDirection == DragDirection.Vertical)
{
// Handle vertical drag logic
}