# Nodes Nodes are the most basic part of creating scripts in Visual Scripting. They can do a variety of things; for example, they can listen for events, get the value of a variable, or modify a component on a GameObject. Nodes appear as "blocks" in the Graph Editor: ![](images/vs-node-example.png) You can arrange and connect these blocks to create logic for your application. ## Node anatomy Visual Scripting highlights the nodes in your current selection. All nodes have a header, which displays the node's name. If you select a node in your graph, the Visual Scripting Graph Inspector displays the following information: - The node's name and icon. - If applicable, a brief description of what the node does. - If applicable, any current warning messages or errors for the node. - If applicable, any additional settings for the node. - The required type for each input and output port, which might also include a brief description of each port. For more information on the Graph Inspector, see [The Visual Scripting interface](vs-interface-overview.md). ### Connections and ports You can connect a port from one node to a compatible port on another node, to create a logical flow in your Visual Scripting graphs. Visual Scripting highlights ports on any other nodes in your graph where you can make a valid connection, and dims any nodes or ports where there isn't a valid connection. Connections are also color-coded: connections that control the logic flow in your graph are white, and connections for values are colored based on the value's type. For more information about types, see [Object types](vs-types.md). Ports on the left side of a node are **Input Ports**. Ports on the right side of a node are **Output Ports**. Input and output ports can also have different types: |**Port**|**Description** | | :--- | :--- | |__Control Ports__ | Control ports control the logical flow of your graphs. They tell Visual Scripting what order it should execute the nodes in a graph, from left to right. The arrows located beside these ports display the direction of the flow of logic in your graph.| |__Data Ports__ | Data ports send and receive data, such as number values or GameObjects, between nodes. They also have colors that correspond to the specific type they expect to receive as inputs, or send as outputs. | You can make multiple connections from a single Data Output port to different Data Input ports, or have multiple Control Output ports that connet to a single Control Input: ![An image of the Graph Editor, showing multiple connections from a single Data Output port to mutliple Data Input ports and multiple Control Output ports connecting to a single Control Input port](images\vs-multiple-connections-example.png) You can't connect multiple Data Output ports to a single Data Input port, because it wouldn't be clear which value Visual Scripting should use in your application. You also can't connect a single Control Output port to multiple Control Input ports, because Visual Scripting wouldn't know which node to run first. For more information on how to connect nodes, see [Connect nodes in a Script Graph](vs-creating-connections.md). Nodes can also have additional parameters, which might or might not be connected to a port, like the following:
Element | Example | Description |
---|---|---|
Container Type | Some nodes might require you to specify a container type, which tells the node what type it should expect as an input. For example, by a container type might tell a node that it should expect to receive a GameObject instead of a Script Machine. | |
Kind | Some nodes might require you to specify a kind, which tells the node which variable scope it should use to locate the variable given as an input. For example, a kind might tell a node to look for the variable Count as a Graph variable, rather than a Scene variable. |
|
Inline Value | Instead of connecting to another node to receive a value, you can use a node's Inline Value field. Not all Visual Scripting types support Inline Value fields, but they can help to simplify your graphs. |