GraphElement
Base class for main GraphView VisualElements.
Read time 8 minutesLast updated 11 days ago
Definition
- Type: Class
- Namespace: UnityEditor.Experimental.GraphView
- Assembly: UnityEditor
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, ISelectable
[UxmlElement]public abstract class GraphElement : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, ISelectable
Properties
Property | Description |
|---|---|
| capabilities | The GraphElement's capabilities. |
| elementTypeColor | The color used for the MiniMap view. |
| layer | The GraphElement's layer in the graph. |
| selected | True if the GraphElement is currently selected. |
| showInMiniMap | Whether the element is shown in the minimap. |
| title | The GraphElement's title. |
Methods
Method | Description |
|---|---|
| GetGlobalCenter | Get the GraphElement's center point. |
| GetPosition | Get the GraphElement position. |
| HitTest | See if point is over the GraphElement. |
| IsAscendable | Checks if the GraphElement is automatically brought to front when selected. |
| IsCopiable | Checks whether the GraphElement is copiable. |
| IsDroppable | The GraphElement is drag&droppable. |
| IsGroupable | Checks whether the GraphElement is groupable. |
| IsMovable | The GraphElement is movable. |
| IsRenamable | The GraphElement is renamable. |
| IsResizable | The GraphElement is resizable. |
| IsSelectable | The GraphElement is selectable. |
| IsSelected | The GraphElement is currently selected in specific container. |
| IsSnappable | Checks whether the GraphElement is snappable. |
| IsStackable | Checks whether the GraphElement is stackable. |
| OnCustomStyleResolved | Called when the custom style properties are resolved. |
| OnSelected | Called when the GraphElement is selected. |
| OnUnselected | Called when the GraphElement is unselected. |
| ResetLayer | Reset the GraphElement to its original layer. |
| Select | Select the GraphElement. |
| SetPosition | Set the GraphElement position. |
| Unselect | Deselect the GraphElement. |