Edge
The GraphView edge element.
Read time 10 minutesLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEditor.Experimental.GraphView
- Assembly: UnityEditor
- Inherits from: GraphElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, ISelectable
public class Edge : GraphElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, ISelectable
Constructors
Constructor | Description |
|---|---|
| Edge() | Edge's constructor. |
Properties
Property | Description |
|---|---|
| candidatePosition | The edge's end position while it's being created. |
| defaultColor | Default edge color. |
| edgeControl | The VisualElement child of Edge that draws the lines and does the hit detection. |
| edgeWidth | Edge width. |
| ghostColor | The color of the ghost edge, which is the edge that appears snapped to a nearby port while an edge is being created. |
| input | Connected input port. |
| isGhostEdge | Is this edge a ghost edge, which is the edge that appears snapped to a nearby port while an edge is being created. |
| output | Connected output port. |
| PointsAndTangents | The edge's points and tangents. |
| selectedColor | Color of edge while selected. |
| showInMiniMap | Whether the GraphElement is shown in the minimap. For Edge, this property is always set to false. |
Methods
Method | Description |
|---|---|
| ContainsPoint | Checks if point is on top of edge. |
| CreateEdgeControl | Create the EdgeControl. |
| DrawEdge | Draw the edge's lines. |
| OnCustomStyleResolved | Called when the custom style properties are resolved. |
| OnPortChanged | Called when a port on the edge is changed. |
| Overlaps | Check if edge overlaps rectangle. |
| UpdateEdgeControl | Update the edge's EdgeControl. |