The VRChat Documentation Hub

Welcome to the VRChat Documentation hub. You'll find comprehensive guides and documentation to help you start working with VRChat as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Udon Node Graph

Interface

The Udon Node Graph is the default interface for creation of Udon programs. This section goes over how to use it. If you want to dive right into examples, take a look at the Readme file in the VRChat Examples folder that comes with the SDK.

You can open up the Udon Graph window using the Menu Item under VRChatSDK > Udon Graph, or by clicking the Open Graph button on an UdonBehaviour Component.

The Udon Window

If you open the window through the Menu command, you'll see the welcome screen, which has a changelog and some settings. It will also show a button to re-open the last graph you had open if you have one.

Flow

The Flow of your graph defines which nodes will run, and the order in which they'll do it.

A simple graph with a flow that branches to two different places

The triangles in the picture above are the Flow ports, and they trigger in order from left to right, following the noodles that connect them. To understand what is happening in Udon graphs and to make your own, follow the flow.

In the graph above:

  1. The Start event triggers when the world loads
  2. The Branch triggers next. It checks the value of its checkbox and then triggers either the True or False path.
  3. If the value is True, then we trigger the top node, which sends a Custom Event called "Hello".
  4. Otherwise, we will send a Custom Event called "Goodbye"

It's ok if you don't know Sending a Custom Event means yet. Learning to read the flow of a graph is the first step to understanding what they do.

Creating Nodes

Nodes are the boxes which represent the methods you can trigger. Building a graph consists of creating and connecting nodes together to create a program.

There are two main ways to create nodes - through Drag-and-Drop actions, and through search.

Drag and Drop for GameObjects and Components

If you want to add interactivity to a GameObject or Component, you can drag and drop them from your hierarchy to the graph. For example, you can drag and drop a Light component by grabbing dragging from the 'Light' title onto the graph.

Easy way to get a reference to a Light component so you can play with it.

Creating nodes via Drag and Drop this way creates Variables that are tied to your GameObject or Component, so you'll see a new variable appear in the Variables window, and a node which is actually a "Get Variable" node which is automatically set up to get your new Component.

Drag and Drop for Variables

You can create variables of any type by pressing the + button in the Variables window. Then you can drag and drop the variable name onto the graph to create a "Get Variable" node, or hold the Ctrl key while dragging to make a "Set Variable" node.

Searching for Nodes

Press the Spacebar to open up Quick Search, then type in the first few letters of the class you want to interact with.

If we want to get the name of a GameObject, we type "ga", which highlights GameObject, then press enter to narrow our focus to GameObject. Then we type "name" which focuses further to get name / set name. Press enter one last time to create the "get name" node.

This method of searching works best if you know Unity's basic classes and object types. There are other ways of searching, see: Searching for nodes

Compiling the Graph

The graph automatically compiles in the background at regular variables. When this happens, you'll see a flash in the upper-right corner of your graph, and the Status box will turn green if things went well, or red if there's an issue. In either case, you can click on the Status box to see the Assembly Code that was generated, or the errors if there was a problem.

The status box shows 'OK' and we can see the Variables declared at the top of this Assembly.

Running the Graph

There are two ways to run the graphs in your scene before you upload them to VRChat.

Running In-Editor

You can use Unity's Play Button to run your scene directly in the editor to test out some graphs. This will work for some simple methods and logic, but the following items won't work as expected:

  • Synced Variables & Networked Events
  • The VRCPlayerAPI object - using stations, triggering Interact events, anything involving Avatars

Running Build & Test

Use the VRChat SDK Window to do Local Testing. This takes slightly longer as it bundles your content into an offline world and launches the actual VRChat client to give you an Avatar that can Interact with objects and VRCPlayerAPI requests.

The simplest way to test Sync features is to launch 2 local clients.

To test Synced variables and NetworkEvents, you'll need two clients - you can use the 'Number of Clients' field to launch up to 8 local clients that will launch in a private test world. They will all have the same DisplayName, but they'll otherwise be recognized as separate players so you can test out your interactions.

❗️

Set Your Local Client Path

If 'Force Non-VR' doesn't work for you, then switch to the 'Settings' tab of the VRChat SDK Window and set your VRChat Client Path to point at your actual VRChat installation.

Uploading Your World

You will be able to Build & Test as soon as you make a VRChat Account. In order to publish a world so others can visit, you need to spend some time in VRChat - visit worlds, make some friends and get inspired!

Updated 14 days ago


What's Next

Read about all the Elements of the Udon graph

Graph Elements
Searching for Nodes

Udon Node Graph


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.