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

Wire knots

Add a wire knot to bend a wire around other nodes, move it by its ring or with Cmd/Ctrl from anywhere on it, branch a new wire that shares it, and remove it, all without touching the C#.

A wire knot is a point a wire passes through on its way from one pin to another. Double-click a wire to add one, then drag it to bend the wire clear of the nodes in its path. A knot is layout: it changes where the wire is drawn and nothing about the C#.

One value often feeds a node far across the canvas. Its colored wire then runs behind the nodes in between and crosses the white path on the way, and following it by eye means tracing a curve that starts beside another one and disappears under a node. Moving the nodes to untangle it would spoil the left-to-right order that makes the white path readable. In the Platformer sample’s UpdateGrounded diagram, the purple collision wire into GetContact does exactly this, crossing the white wire into the loop.

Add a wire knot when one wire, rather than a node, is in the wrong place: a long data wire that runs behind a node, two wires that cross where they need not, or a wire you want to route along the edge of a group of nodes. Move nodes first if the nodes are what is out of order, and use Snap to grid and Align nodes to tidy them. Knots work on white exec wires and colored data wires alike.

The two halves of a wire knot, and Cmd/CtrlThe purple collision wire leaves the UpdateGrounded entry node and bends through a square wire knot on its way to the target pin of GetContact. Three callouts appear in order: the knot's outer ring, where a drag moves the knot; its center, where a drag starts a new wire, shown reaching the input of the contactCount pill and sharing the knot; and the whole knot highlighted with Cmd/Ctrl held, where a drag from anywhere on the knot moves it. The final frame shows every label.UpdateGroundedcollisionGetContacttargetindexcontactCountCmd/Ctrlouter ring: drag to move the knotcenter: drag out a new wireCmd/Ctrl: the whole knot movesThe two halves of a wire knot, and Cmd/CtrlThe purple collision wire leaves the UpdateGrounded entry node and bends through a square wire knot on its way to the target pin of GetContact. Three callouts appear in order: the knot's outer ring, where a drag moves the knot; its center, where a drag starts a new wire, shown reaching the input of the contactCount pill and sharing the knot; and the whole knot highlighted with Cmd/Ctrl held, where a drag from anywhere on the knot moves it. The final frame shows every label.UpdateGroundedcollisionGetContacttargetcontactCount12Cmd/Ctrl31outer ring: drag to move the knot2center: drag out a new wire3Cmd/Ctrl: the whole knot moves
A wire knot has two halves: drag its outer ring to move it, or drag from its center to start a new wire that carries the same value and shares the knot. Hold Cmd/Ctrl and the whole knot, center included, moves.

Move the pointer near a wire and the wire brightens, while a faint ghost knot slides along it under the pointer to show where a double-click would put a knot. A placed knot is a small square in the wire’s color. Hover it and a ring appears around it, and the cursor tells you what a press will do: the move-arrow over the outer ring, the link cursor over the center. Hold Cmd/Ctrl and the move-arrow covers the whole knot, center included. It is the same key that means move everywhere else on the canvas: Cmd/Ctrl-drag from a pin moves a wire’s end, and Cmd/Ctrl-drag a wire’s pill end splits a pill.

Route wires with knots

  1. Build the visual script

    Build a visual script with one long wire. In the left rail, click + on the Methods header and press Enter: a magenta entry node appears. Right-click empty canvas to its right, type Debug.Log into search and click the Log row. Place a second Log node the same way, further right. Drag a white wire from the entry node’s Exec pin to the first Log node, and another from the first Log node’s Exec output to the second. Type "Start", quotes included, in the box beside the first node’s message pin.

    Clip: the + button beside Methods is highlighted with an arrow while it is clicked and a new method is added. Then two Debug Log cards are chosen and connected by white execution wires, and Start is typed into the first message.
  2. Wire gameObject to the second Log

    Right-click empty canvas below the entry node and, in the VARIABLES section, click get on gameObject. Drag from the purple pill’s dot to the second Log node’s message pin. A long purple wire runs under the first Log node to reach it.

    Clip: the canvas menu opens and the get button on the gameObject row is highlighted as it is chosen. The pill’s dot is then highlighted as the wire is dragged out, and the second Log message pin is highlighted as the purple wire reaches it.
  3. Find the ghost knot

    Move the pointer close to the long purple wire.

    A faint purple ghost knot, highlighted with an arrow pointing at it, follows the pointer along the long gameObject wire.
  4. Place a knot

    Double-click the wire where it passes under the first Log node. A wire knot, a small purple square, appears at that spot and the wire now runs through it.

    A purple square knot, highlighted with an arrow pointing at it, sits on the gameObject wire.
  5. Drag the ring

    Hover the knot. Its ring appears. Press on the outer ring, where the cursor is the move-arrow, and drag the knot down, clear of the first node. The wire redraws as you drag, and every wire that shares the knot follows it. Release, and the move is one undo step. A drag that ends where it started records nothing.

    Clip: the pointer moves onto the knot, which is highlighted with an arrow pointing at it until the ring is pressed. The knot is then dragged down by its outer ring and released, and it is highlighted again with an arrow at its new position.
  6. Move from the center

    Hold Cmd/Ctrl and point at the knot. The cursor is the move-arrow over the whole knot. Cmd/Ctrl-drag from its center and it moves, the same as a drag on the ring, with no need to find the ring first.

    Clip: with Control held, the pointer moves onto the knot, which is highlighted with an arrow pointing at it until the press. The knot is then dragged from its center to a new position, where it is highlighted again with an arrow.
  7. Branch from the knot

    Let go of Cmd/Ctrl, press in the knot’s center, where the cursor is the link cursor, and drag onto the first Log node’s message pin. A new purple wire follows the pointer out of the knot. Release on the pin. Press Escape during such a drag to cancel without connecting.

    Clip: a wire is dragged from the knot center, highlighted, to the first Log message pin, which is then highlighted as the wire lands on it. The shared knot is moved, and another connection is canceled with Escape.
  8. Select and delete

    Click the knot, then press Delete or Backspace.

    Clip: the shared knot (highlighted with an arrow) is selected, then Delete removes it from one wire.
  9. Remove a knot from the menu

    Double-click the wire again to add a knot, then right-click the knot and choose Remove wire knot. On a shared knot this takes the knot off one wire; the other wire keeps its own copy in the same place.

    Clip: a knot is added on the purple wire and removed using the native context menu, whose Remove wire knot item is highlighted.
  10. Undo the removal

    Click the other visible knot to give the graph keyboard focus, then press Cmd/Ctrl+Z. Each knot you add, move or remove is its own undo step, so undo puts the removed knot back exactly where it was.

    The purple knot has returned to its wire after Ctrl+Z; it is highlighted with an arrow pointing at it, on the wire below the first Log card.
  11. Compile and reload

    Press Compile in the toolbar.

    The reloaded method shows both Log cards connected to gameObject and the saved purple knots.

Nothing in the script. A wire knot is layout, saved in the method’s .rt.json layout file on the entry for the wire it sits on, under edges for a white wire or dataEdges for a colored one. Each knot has a position and an id:

This is the whole saved entry for the long purple wire after step 5. The wire’s id is a stable identifier derived from the nodes and pins it connects, so the knots stay on the right wire after Round Trip rereads the script, a Compile or reopening the project. A shared knot is one knot id listed on both wires, each wire with its own copy of the position, which is why removing it from one wire leaves the other intact.

The class’s .cs file is unchanged by adding, moving or removing a knot, and Compile has nothing to write for them. The exception is a wire you branch out of a knot in step 7: the knot is layout, but the new connection is a real edit to the method, so it waits as a draft for Compile like any other wire you draw. Auto layout clears the knots you placed in that diagram, and you can undo it during the session. Knots stay at the exact point you release them; Snap to grid places nodes and pills.

When it goes wrong

SymptomCheckFix
Dragging a knot drew a new wire instead of moving it.The press landed in the center of the knot, where the cursor is the link cursor.Press Escape to cancel, then drag the outer ring, or hold Cmd/Ctrl and drag from anywhere on the knot.
Double-clicking a wire added no knot.The pointer was too far from the wire: the wire did not brighten and no ghost knot showed under the pointer.Move closer until the ghost knot appears on the wire, then double-click.
Moving one knot moved two wires.One of the wires was branched out of the knot, so the two wires share it.Right-click the knot and choose Remove wire knot to take it off one wire, then give that wire its own knot.
Delete or Backspace left the knot in place.The knot has no orange outline, or a text box has keyboard focus.Click the knot so it shows the orange outline, then press Delete or Backspace, or use Remove wire knot from its menu.
A knot is gone after reopening the method.Confirm where layout files are stored and that layout saving is available for this method.Choose the intended storage location in Layout and configuration files, add the knot again and leave the method normally.
Auto layout removed the knots on a carefully routed wire.Auto layout resets the whole diagram, including every knot you placed.Undo during the current session, or add the knots again after the reset.
Full-size image