Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Port

GraphView Port class.
Read time 10 minutesLast updated 9 days ago

Definition

public class Port : GraphElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, ISelectable

Properties

Property

Description

allowMultiDragWhen this property is set to true, you can select multiple edges connected to this port, and drag them all at the same time (for example, to disconnect them and reconnect them to another port). When this property is set to false, you can only drag one connected edge at a time.
capacitySpecify how many edges a port can have connected.
collapsedPort's collapsed state.
connectedPort's connected state.
connectionsAll the port's current connections.
directionPort's direction.
disabledPortColorThe color of the port when disabled.
edgeConnectorReference to the edge connector.
highlightIs the port highlighted.
nodePort's node.
orientationPort's orientation.
portCapLitIs the port cap lit or not.
portColorThe color of the port.
portNamePort name.
portTypePort type.
showInMiniMapWhether the element is shown in the minimap. For Port, this property is always set to false.
sourcePort's source.
visualClassThe name of the uss class to use to style the port.

Methods

Method

Description

ConnectConnect and edge to the port.
ConnectToCreates an edge between this port and the 'other' port.
ContainsPointCheck if point is on top of port. Used for selection and hover.
DisconnectDisconnect edge from port.
DisconnectAllDisconnect all edges from port.
GetGlobalCenterGet the port's center.
HandleEventBubbleUpExecutes logic on this element during the BubbleUp phase, immediately before this element's BubbleUp callbacks. Calling StopPropagation will prevent further invocations of this method along the propagation path.
OnCustomStyleResolvedCalled when the custom style properties are resolved.
OnStartEdgeDraggingCalled when an edge is dragged.
OnStopEdgeDraggingCalled when an edge dragging ends.

Static Methods

Method

Description

CreateFactory method for creating a port.

Enums

Enum

Description

Port.CapacitySpecify how many edges a port can have connected.

Inheritance

Inherited Members