Description
The ConnectionStyle
property in the GraphView
class of the Editor.NodeEditor
namespace specifies the visual style used for connections between nodes in a node editor graph. This property is virtual, allowing derived classes to override it and provide custom connection styles.
Usage
To use the ConnectionStyle
property, you can access it directly from an instance of the GraphView
class. You can also override this property in a subclass to customize the appearance of connections in your node editor.
Example
// Example of accessing the ConnectionStyle property
var graphView = new GraphView();
var currentStyle = graphView.ConnectionStyle;
// Example of overriding the ConnectionStyle property in a derived class
public class CustomGraphView : GraphView
{
public override ConnectionStyle ConnectionStyle
{
get { return new CustomConnectionStyle(); }
}
}