Skip to content
Bit Quirky Round Trip
Visual Scripting

Search documentation

All topics and APIs

Close returns focus to Search.

What are you looking for?

Try a common topic or a C# feature.

Browse the reference instead

Esc closes · Tab reaches results · Enter opens the focused link

v1.0.0
Menu

Variables

Make GET pills and SET nodes by dragging variables, properties, and locals from the Variables rail onto the canvas.

A row in the Variables rail is both a list entry and a handle. Drag it onto the canvas to read the value with a GET pill or change it with a SET node.

The lower half of the left rail lists stored values. Variables holds the class’s variables and storage-like properties, and Local variables holds the open method’s own values. Dragging a row onto the canvas makes a GET pill or a SET node tied to that exact variable, so you never type a name into a search box and pick a lookalike from another class.

Looking for a property that is under Methods instead? Properties normally appear here, but a getter that calculates a result or a setter that runs behavior belongs under Methods. This exposes the code that runs when the property is used; it does not turn the property into a C# method. Properties: Variables or Methods? explains the rule with screenshots and code from God Complex.

Reach for the rail whenever a node needs a value the component keeps, or should change one: the player’s health after a hit, the coin count after a pickup, the direction a patrolling enemy faces after it reaches a wall, a cooldown timer that counts down each frame. Use GET to read the value and SET to change it.

A property row offers only what it has: a read, a write, or both. In a method marked Static, the class’s ordinary variables are unavailable, because there is no particular object to read them from.

Find a variable in the rail or the canvas menu

Select a screenshot to enlarge it.

PlayerController Variables section with a count of 13: IsReady under PUBLIC, then PRIVATE rows starting with CoinsPerPickup as int = 1 and purple object-reference rows beneath it.
Figure 1. Start from the named row Each row gives the name and type. Drag a row to the canvas to choose GET or SET; the + in this header adds a new variable instead.
The all actions menu over CollectCoin with LOCAL VARIABLES and VARIABLES groups, each row offering get, set and name of.
Figure 2. Or use the canvas menu Right-click empty canvas for this alternative. The enabled row offers get and set, while CoinsPerPickup has set dimmed. Choose the action beside the value you actually need.

The captures use the Platformer scene and PlayerController. The SET node is repositioned and the canvas framed for readability; the pointer and click markers in the clips are site overlays.

Read and update a variable

  1. Add a method

    In the left rail, click + on the Methods header and press Enter. A magenta entry node appears on the canvas.

    The Graph view with the + button beside Methods in the left rail highlighted and an arrow pointing at it, and the new method's entry node on the canvas.
  2. Add a variable and a local variable

    Click + on the Variables header. A new row opens with a name box. Type coins and press Enter. The row shows its type, int, with a green dot. Click + on the Local variables header the same way: a row named newVar opens for renaming.

    Add and name the coins variable, then add a local variable draft. The + button beside Variables is highlighted first and the + beside Local variables second, each with an arrow pointing at it.
  3. Place a SET node

    Press on the coins row and drag it onto empty canvas. When you let go, a small menu offers get coins and set coins. Click set coins. A dark blue node appears with coins on the left of its header and SET on the right, white Exec pins, a green Value input, and a Value output.

    Drag the coins row, highlighted in the Variables rail, onto the canvas and choose set coins, which is highlighted with an arrow pointing at it once the menu opens.
  4. Connect execution

    Drag a white wire from the entry node’s Exec pin to the SET node’s Exec pin. The node is now on the white path.

    Drag a white execution wire from the method entry's Exec pin, highlighted first, to the coins SET node's Exec pin, highlighted second, each with an arrow pointing at it.
  5. Read and add one

    Drag the coins row onto the canvas again and choose get coins. A green pill labeled coins appears. Right-click empty canvas and, under OPERATORS, click Add. Wire the pill’s dot into the Add node’s first input, type 1 in the box beside its second input, and wire the Add node’s output into the SET node’s green Value pin.

    Create a coins GET and an Add node, starting from the coins row highlighted in the Variables rail, wire coins into Add and its result into SET, and enter one in the remaining input.
  6. Use the row menu

    Right-click a row instead of dragging it. Create get node and Create set node place the same pill or node on the canvas.

    The native CoinsPerPickup row menu with Create get node and Create set node highlighted, and Create set node disabled with the Read only reason.
  7. Compile the change

    Press Compile in the toolbar at the top of the Graph view. Round Trip writes the change, the canvas reloads, and the SET node stays on the white path with the pill feeding it.

    The whole Graph view with the draft ready to compile: NewMethod runs into the coins SET, fed by the coins pill through ADD with 1. The toolbar Compile button is highlighted, with an arrow pointing at it.

If you also work in C#, a GET and a SET on a variable named _direction appear in the script like this:

A GET supplies its value inside the node it feeds. A SET writes a line of its own on the white path. A SET on a property uses the property’s setter, so it exists only when the property has one.

When it goes wrong

SymptomCheckFix
Create Set Node is dimmed and reads read only.Read the row: a read-only property or a constant cannot be changed.Use Create Get Node to read it, or pick a variable that can be changed.
Dragging a variable onto the canvas does nothing.Look at the method in the inspector: Static is ticked, and the variable belongs to each object.Use a static variable, or work in a method without Static ticked.
The drag menu offers the wrong variables.Read the Local variables header: it names the method the rail is showing.Click the method you mean in the Methods list first, then drag from the refreshed rail.
A new variable cannot be dragged.Look for an empty name box on the row.Type a name and press Enter. A variable with no name has nothing to read or write.
Full-size image