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

Layout, wire knots, and comments

Arrange a diagram, bend wires with wire knots, keep the view, and read and write comments beside the nodes they explain.

A readable diagram lets the next person follow the white path at a glance. Move nodes, bend wires, and leave comments where they help. Layout changes do not alter the method’s behavior; changing connections does.

Round Trip lays out every method for you when it opens, but it cannot know which path you care about. A wire may run behind a node, or a loop may push the interesting branch off screen. The layout tools let you move and line up nodes, bend a long wire around other nodes with wire knots, and keep a comment open beside the node it explains. Moving things changes only the picture: the arrangement is saved beside the script, and the method runs exactly as before.

Arrange a diagram once you know what it does, such as after you finish building a pickup’s behavior or before you hand an enemy’s patrol to a teammate. Use the align commands to line several nodes up on one of them. Use wire knots to guide a long wire around nodes. Leave a method comment when the reason for a choice is not obvious from the nodes, such as why the enemy turns at the edge. Use Auto layout when a hand arrangement has become harder to read than the default.

Arrange the path and explain its purpose

Select a screenshot to enlarge it.

UpdateGrounded on one row: the white exec wire runs through FOR, GetContact, BRANCH and the grounded SET to EXIT. A purple wire from the collision output dips below the row through two square knots and rises into GetContact target.
Figure 1. Keep the main path readable This hand-arranged UpdateGrounded example keeps the white path on one row and the pills beside the nodes that use them. Two square knots lead the purple collision wire under FOR instead of through it. The arrangement is saved in the method’s .rt.json file, not its C#.
The CollectCoin METHOD COMMENT card shows an XML summary. The Simple and XML style controls sit above Edit.
Figure 2. Put the explanation in the method comment A separate CollectCoin example shows where method comments live. Choose the method in the left rail, then use METHOD COMMENT on the right. The canvas example in What it writes below shows the yellow comment glyph.

Arrange and explain a method

  1. Build something to arrange

    In the left rail, click + on the Methods header and press Enter: a magenta entry node appears. Right-click empty canvas, type Debug.Log into search and click the Log row, then do it again for a second Log node. Drag white wires from the entry node’s Exec pin to the first Log node and on to the second. Right-click below them and, in the VARIABLES section, click get on gameObject, then the same way on transform. Wire the gameObject pill into the first node’s message pin and the transform pill into the second node’s.

    Clip: Create a method, add and connect two Debug.Log calls, then feed them from gameObject and transform.
  2. Move the cards

    Drag a node by its title to a clearer spot. Move each pill close to the node it feeds.

    Clip: Drag a Log card and both read pills into a clearer arrangement.
  3. Align to the last selection

    Click the gameObject pill, Cmd/Ctrl-click the first Log node, and press Shift+A. The pill’s left edge moves to the node’s left edge; the node you clicked last stays put. Align nodes covers all six commands and the three ways to run them.

    Clip: Select gameObject, Ctrl-click Log last, and align their left edges.
  4. Pan and zoom

    Scroll over the canvas to zoom (or to pan, if you set scrolling to pan in your preferences), and drag empty canvas with the middle or right mouse button, or with the left button while you hold Alt (Option on macOS), to pan, until your nodes fill the view.

    Clip: Scroll over the canvas and Alt-drag to adjust the view.
  5. Bend the wire

    Double-click the purple wire into the second Log node. A wire knot, a small purple square, appears. Drag it by its ring to bend the wire along the route you want. Wire knots covers moving, branching and removing knots.

    Clip: Double-click the transform wire and drag the new knot by its ring.
  6. Break and restore a link

    Alt-click (Option-click on macOS) the purple wire into the first Log node. It breaks, and that message pin goes hollow. You can also right-click a wire and choose Break link. Press Cmd/Ctrl+Z to restore it.

    Clip: Alt-click the gameObject wire to break it, then undo.
  7. Comment and compile

    Click the magenta entry node. In the right rail, under METHOD COMMENT, click Add a comment… and type why the method exists. Save the comment in the rail, then press Compile in the toolbar. Open another method and come back to see the saved view from step 4.

    Clip: Add a method comment, compile, then reopen the saved method and its view. In turn, the Add a comment button in the right rail, the Save button and the toolbar Compile button are highlighted, with arrows pointing at them.
  8. Read and resize the comment

    Hover the yellow glyph. A sticky-note popup shows the comment beside the node. Click the glyph to keep the note open, then drag the popup’s corner grip to resize it.

    Clip: Hover and click the comment glyph, then resize the sticky-note popup.
  9. Reset the arrangement

    Click Auto layout in the toolbar and confirm Reset to Default Layout? with OK (the clip presses Enter). Press Cmd/Ctrl+Z to get your arrangement back during this session.

    Clip: choose Auto layout and confirm the native dialog, undo the reset with Ctrl+Z, then Alt-drag the canvas to bring the restored arrangement into view. The Auto layout button in the toolbar is highlighted, with an arrow pointing at it.

If you also work in C#, a method comment typed with // Simple selected lands above the method in the script:

Moving nodes, aligning them, changing the view, and adding wire knots do not alter that script. They update the method’s .rt.json layout file.

When it goes wrong

SymptomCheckFix
Auto layout removed a carefully bent wire.Auto layout clears the wire knots you placed along with your hand positions.Press Cmd/Ctrl+Z during the current session, or add the knots again after the reset. See Wire knots.
Auto layout gave a value a second pill, or undid a pill I split.Auto layout plans the pills again: uses of a value that sit far from its first use get a pill of their own. The rule is set under READ PILLS in Preferences > Round Trip.Press Cmd/Ctrl+Z, or recombine the pill from its wire. To keep every read as one pill at the next Auto layout, switch off Split long read wires, or raise Split distance.
The comment popup on a node cannot be edited.Popups on nodes inside a method show comments from the script, read only.Edit method comments in the right rail under METHOD COMMENT, and comments inside the method in the script.
The align entries are dimmed, or Shift+A does nothing.Count the rings on selected nodes, and check whether a text field has keyboard focus.Select at least two nodes, click empty canvas to leave the text field, then align again. See Align nodes.
Full-size image