Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Node

Main GraphView node class.
Read time 10 minutesLast updated 5 days ago

Definition

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

Constructors

Constructor

Description

Node()Node's constructor.
Node(System.String)Node's constructor.

Properties

Property

Description

expandedIs node expanded.
extensionContainerEmpty container used to display custom elements. After adding elements, call RefreshExpandedState in order to toggle this container visibility.
inputContainerInput container used for input ports.
mainContainerMain container that includes all other containers.
outputContainerOutputs container, used for output ports.
titleNode's title element.
titleButtonContainerTitle bar button container. Contains the top right buttons.
titleContainerTitle bar container.
topContainerEntire top area containing input and output containers.

Methods

Method

Description

BuildContextualMenuAdd menu items to the node contextual menu.
CollectElementsRetrieves the set of edges that match a specified condition. The tested edges are connected to this node.
InstantiatePortCreate a new port specific to this node.
OnPortRemovedCalled when port is remove.
RefreshExpandedStateAfter adding custom elements to the extensionContainer, call this method in order for them to become visible.
RefreshPortsRefresh the layout of the ports.
SetPositionSet node position.
ToggleCollapseToggle node's collapse state.
UseDefaultStylingApplies the default styling of Node. This must be explicitly called by Node subclasses that use their own uxml files.

Inheritance

Inherited Members