docs.unity3d.com
  • Manual
  • Scripting API
  • Changelog
  • License
Show / Hide Table of Contents
  • About Visual Scripting
    • Configure project settings
      • Add or remove available nodes
      • Add or remove types
      • Create or restore a backup
    • Choose a control scheme
    • Configure your preferences
    • Update Visual Scripting
    • Version control systems
    • Use Visual Scripting with Unity Cloud Build
  • Basic concepts in Visual Scripting
    • The interface
    • Nodes
    • Graphs
      • Subgraphs and State Units
      • Transitions
    • Script Machines and State Machines
    • Object types
      • Custom types
    • Variables
  • Develop application logic with Script Graphs
    • Create a new graph file
      • Create a new blank graph with the Project window
      • Create a new unassigned graph with the empty graph creation flow
      • Create and assign a graph to an existing GameObject
      • Create and assign a graph to a new GameObject
      • Create a graph on a Script Machine or State Machine
    • Attach a graph file to a Script Machine or State Machine
    • Open a graph file
      • Add a node to a Script Graph
      • Connect nodes in a Script Graph
      • Create and add a variable to a Script Graph
      • Create node groups
      • Add comments to a graph
    • Add a Subgraph to a Script Graph
      • Add a Trigger or Data port to a Script Graph
    • Add a State Unit to a Script Graph
    • Custom Events
      • Add a Custom Event node
      • Add a Trigger Custom Event node
    • Capture user input in an application
      • Capture input using the Input Manager
      • Add and configure a Player Input component
      • Capture input using the Input System package
    • Use relations to debug
      • Predictive and live debugging
      • Working with debug messages
    • Live edit
      • Live edit during runtime
  • Develop logic transitions with state graphs
    • Create a new state
    • Create a transition between states
  • Advanced customization and development
    • Refactor a C# script with Visual Scripting
      • Add the RenamedFrom attribute to a C# script
    • Custom C# nodes
      • Create a new simple Custom C# node
      • Add ports to your Custom C# node
      • Add logic to your Custom C# node
      • Add relations to your Custom C# node
      • Add documentation to your Custom C# node
      • Custom C# node attributes reference
    • Create a Custom Scripting Event node
      • Create a Custom Scripting Event Sender node
      • Trigger a Custom Scripting Event from a C# script
      • Listen to a Custom Scripting Event from a C# script
    • Use a custom type
      • Add the Inspectable attribute to a custom type
      • Create a custom PropertyDrawer for a custom type
  • Node reference
    • This node
    • Control node
    • Time node
    • Events
      • Event nodes
      • Input Event nodes
        • On Input System Event Button
        • On Input System Event Float
        • On Input System Event Vector 2
        • On Button Input
        • On Keyboard Input
        • On Mouse Down
        • On Mouse Drag
        • On Mouse Enter
        • On Mouse Exit
        • On Mouse Input
        • On Mouse Over
        • On Mouse Up As Button
        • On Mouse Up
    • Variable node
    • Nulls node
    • Formula node
    • Nesting
      • Input node
      • Output node
      • State Unit node
      • Subgraph node
    • Script graph nodes
    • State graph nodes
  • Developer's guide
  • Known Issues

The interface

Visual Scripting's main window is the Graph window.

An image of the Visual Scripting Graph window. The Graph Inspector and Blackboard are open and a graph is visible in the other half of the window.

The Graph window has five main elements:

  • The Graph Editor, where you create, arrange, and connect nodes.
  • The fuzzy finder, which you can use to find nodes and add them to your graph.
  • The Graph toolbar, where you can change settings specific to your view in the Graph Editor and perform some common layout operations.
  • The Graph Inspector, where you can view detailed information about your nodes and configure additional settings for your graph.
  • The Blackboard, where you can define and edit variables to use in your graphs.

The Graph Editor

The Graph Editor is the center editing area of the Graph window.

An image of the Graph Editor. It displays a graph with multiple nodes and connections.

You can use the Graph Editor to create your Visual Scripting graphs. You can create nodes and connect them with edges.

You can change some default shortcuts and behaviors in the Graph Editor through your control scheme. For more information on the available control schemes in Visual Scripting, see Choose a control scheme.

The fuzzy finder

The fuzzy finder is a searchable menu that lists every node available in Visual Scripting. Right-click anywhere in the Graph Editor to open the fuzzy finder.

An image of the Graph Editor, with the fuzzy finder menu open

Search for a node by name with the Search bar, or open a category from the list to view related nodes. For example, nodes related to the creation or manipulation of variables are in the Variables category.

You can add new nodes to Visual Scripting from your own code, from other packages, or from other Unity features. For more information on how to add nodes to the fuzzy finder, see Configure project settings.

The Graph toolbar

The Graph toolbar lets you display or hide the Graph Inspector and Blackboard. The Graph toolbar also includes a breadcrumb trail for navigation through nested graphs that displays your current location. Select a graph from the trail to return to that graph file.

You can also configure some additional settings that control how nodes display in the Graph Editor.

An image of the Graph toolbar

Property Description
Lock Lock the current Script Graph or State Graph to the Graph window. Visual Scripting keeps the current graph open, even if you select another GameObject with a graph file in the Hierarchy window.
Graph Inspector Display or hide the Graph Inspector.
Blackboard Display or hide the Blackboard.
Breadcrumb Location Displays the name of the current graph. If you open a Subgraph or State Unit, or a State node inside a State Graph, use the breadcrumbs to navigate back to the parent graph.
Zoom Set a zoom level for your view of the Graph Editor.
Relations Enable Relations to display inner flow connections for Script Graph nodes. For example, on a standard Multiply node, the ** Relations** setting draws a line from each input port that merges into a single line on the output port. The lines display the flow of data inside the node. Disable Relations to hide these inner connections.
Values Enable Values to display the input and output values sent between nodes while the Unity Editor is in Play mode. This can make it easier to debug your scripts. Disable Values to hide input and output values while in Play mode. For more information on Play mode, see The Game view in the Unity User Manual.
NOTE

This setting corresponds to the Show Connection Values setting in the Preferences window for Visual Scripting. For more information on this preference, see Configure your preferences.

Dim Enable Dim to dim any nodes in the Graph Editor that aren't yet connected to the control flow in your graph. The Dim setting provides you with a visual cue that a node isn't used in the current configuration of your graph. Disable Dim to display all nodes as active regardless of their connection state.
NOTE

This setting corresponds to the Dim Inactive Nodes setting in the Preferences window for Visual Scripting. For more information on this preference, see Configure your preferences.

Carry Enable Carry to move all connected child nodes when you move a parent node. Disable Carry to only move the currently selected node.
NOTE

This setting corresponds to the Carry Children setting in the Preferences window for Visual Scripting. For more information on this preference, see Configure your preferences.

Overview Select Overview to automatically pan and zoom to fit all elements of your current graph within the Graph Editor.
Full Screen Select Full Screen when the Graph window is docked in the Unity Editor to maximize the Graph window to the full size of the Editor window.

Choose an alignment option to align any nodes in your current selection.

Property Description
Align Left Edges Align all nodes in the selection based on their left edge.
Align Centers Align all nodes in the selection based on their vertical centers.
Align Right Edges Align all nodes in the selection based on their right edges.
Align Top Edges Align all nodes in the selection based on their top edges.
Align Middles Align all nodes in the selection based on their horizontal middles.
Align Bottom Edges Align all nodes in the selection based on their bottom edges.

Choose a distribution option to evenly distribute space between any nodes in your current selection.

Property Description
Distribute Left Edges Distribute all nodes in the selection to leave an equal distance between the left edges of each node.
Distribute Centers Distribute all nodes in the selection to leave an equal distance between the vertical centers of each node.
Distribute Right Edges Distribute all nodes in the selection to leave an equal distance between the right edges of each node.
Distribute Horizontal Gaps Distribute all nodes in the selection to leave an equal-sized horizontal gap between each node. This distribution affects the space between the left and right edges of nodes.
Distribute Top Edges Distribute all nodes in the selection to leave an equal distance between the top edges of each node.
Distribute Middles Distribute all nodes in the selection to leave an equal distance between the horizontal middles of each node.
Distribute Bottom Edges Distribute all nodes in the selection to leave an equal distance between the bottom edges of each node.
Distribute Vertical Gaps Distribute all nodes in the selection to leave an equal-sized vertical gap between each node. This distribution affects the space between the top and bottom edges of nodes.

Your Visual Scripting preferences can change some settings in the Graph toolbar or change how these settings behave. For example, you can control how fast the Graph Editor zooms in and out when you set a zoom level. For more information, see Configure your preferences.

The Graph Inspector

The Graph Inspector provides additional information about an open graph, or about any node you select in the Graph Editor.

An image of the Graph Inspector with a Switch on String node selected

If a node requires additional configuration, you can use the Graph Inspector to set these values.

To display or hide the Graph Inspector, select Graph Inspector (The Graph Inspector icon, of a grey circle with a black, lower case letter "i" in the center.) from the toolbar.

To move the Graph Inspector to the other side of the Graph window, select either Dock Right (The Dock Right button. An arrow points to the right side of a rectangle.) or Dock Left (The Dock Left button. An arrow points to the left side of a rectangle.).

The Blackboard

The Blackboard provides options to configure and manage variables in a graph. The Blackboard divides variables into five distinct scopes, across five tabs: Graph, Object, Scene, App, and Saved.

An image of the Blackboard open to the Graph variables tab

For more information on the available variable scopes in Visual Scripting, see Variables.

To display or hide the Blackboard, select Blackboard (The Blackboard icon. A letter "x" is surrounded by angled brackets.) from the toolbar.

To move the Blackboard to the other side of the Graph window, select either Dock Right (The Dock Right button. An arrow points to the right side of a rectangle.) or Dock Left (The Dock Left button. An arrow points to the left side of a rectangle.).

In This Article
Back to top
Copyright © 2025 Unity Technologies — Trademarks and terms of use
  • Legal
  • Privacy Policy
  • Cookie Policy
  • Do Not Sell or Share My Personal Information