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

When it refuses

Read the refusal message, find the node it names, and fix, undo, or finish that part in C#.

Sometimes Compile says no. That means Round Trip found something on the canvas it cannot save faithfully, so it saves nothing rather than a guess. Your draft stays on the canvas, and the script stays exactly as it was.

A refusal leaves the script untouched, byte for byte. Your nodes and wires stay on the canvas, and a message names the node or the part of the method that stopped the save. From there you fix the node, undo the change, or finish that part in C# and let the canvas reload.

Read the message whenever Compile does not clear the Previewing your changes. panel. It tells you which of three things happened: a node on the canvas is missing something, such as a BRANCH with nothing wired into Condition; the script changed underneath you; or the method holds something the canvas can only show, as a gray placeholder node. Do not delete nodes you still need to get past the message.

A gray Lambda body placeholder feeds the condition of a Where node.
Figure 1. This source shape shows a placeholder, not a captured refusal message. The static lambda in coins.Where(static coin => coin.IsCollected) is marked by the gray Lambda body node. Edit the lambda in C# when you need to change it.

The refusal message names the node or the part of the method that Round Trip declined to save. The screenshot above identifies a placeholder before you reach that message; it does not show a Compile attempt.

Read a refusal and get past it

  1. Fix the hollow pin

    When Compile refuses, fix the empty pin it names: drag a wire into the hollow pin or type a value beside it, as in the last capture. Or click the toolbar’s undo arrow until the incomplete node is gone, or click Revert in the Previewing your changes. panel to drop the whole draft.

    An Add node with left 3 and right hollow, wired into a Log call's message. The hollow right pin with its empty box and the toolbar's undo arrow are highlighted. A red banner across the top of the canvas and a red popover under the Add node both read Node not completely wired: the 'right' operand has no value source, and an operator needs both sides.
    The same Add node with the red banner dismissed. A red popover still anchored under the node reads Node not completely wired: the 'right' operand has no value source, and an operator needs both sides.
    The Add node now reads 3 in left and 2 in right, typed directly beside each pin; the two boxes are highlighted. No popover remains on the node. The toolbar's undo arrow and the Previewing your changes panel's Revert button are highlighted.
  2. Compile again

    Press Compile again.

    The Graph view toolbar with the Compile button highlighted, and no Previewing your changes panel: the save succeeded.
  3. Undo and go to the source

    If the message names something the canvas can only show, look for a gray placeholder node on the white wire. Click the toolbar’s undo arrow to clear your draft, right-click the placeholder, and choose Go to source to open that spot in your code editor.

    Clip: the pointer presses the toolbar's undo arrow, clearing a harmless unrelated draft. The pointer then right-clicks a gray placeholder node and chooses Go to source from the menu that opens. While the draft is cleared, the toolbar's undo arrow is highlighted with an arrow pointing at it.
  4. Finish it in C#

    Make that change in C#, save, and return to Unity.

    The canvas reloaded with no gray placeholder: Count is now an ordinary green LINQ pill feeding GREATER THAN and EXIT.

If someone else changed the script while you were drafting, the message reads:

{file} changed while compiling; discard and try Compile again.

If the method holds a gray placeholder node, the message reads:

The method contains a construct the parser could not represent ('{placeholderReason}'), so it cannot be regenerated faithfully and was left unchanged.

The message names the actual shape it stopped on. These are the messages you can see, grouped by the kind of node involved:

  • Calls: an argument passed by parameter name, an argument marked ref, out, or in (a call’s out argument is an output pin now and is written, so this names a ref or in argument, or an out pin that records no variable to fill), a call to a method taking a params argument list, a lambda passed as an argument, and a generic method group
  • Branches and SET nodes: an if statement with an else block, an if statement with no condition, an assignment with no target, and an assignment with no value input
  • Loops: a loop built on the canvas whose body was never recorded, a loop with no condition to test, and a statement that reads a loop variable from outside the loop that declares it
  • Arrays and structs: an array created with a size rather than a list of elements, a multi-dimensional array, a stack-allocated array, an array creation with no recorded element type, and a struct construction with an object initializer
  • Tuples: a tuple with no elements, a tuple element read with no element recorded, a deconstruction with nothing to take apart, and a deconstruction nested inside another deconstruction
  • Exceptions: a throw with no exception to throw, a throw used as an expression rather than a statement, an object creation with no recorded type, and, when a target-typed creation remains an unmodeled literal, a target-typed object creation ('new()' with no type written)
  • Shapes the canvas can only show: a using statement, an unsafe block, a fixed statement, a local function declaration, a coalescing assignment (the '??=' operator), a yield return, a yield break, an await foreach loop, and an operation with a missing operand

These are the current limits on writing a whole method. The canvas can still show the rest of a method around one of them.

Changes to variables and enum members can refuse too. Round Trip will not change a variable or enum member that sits inside a block the script only compiles on some platforms, or add one where it would land inside such a block. It will not change a variable of a class split across several files when the variable lives in another file. It will not change the attributes of a line that declares several variables at once, an attribute it cannot find, or a member or type that is no longer in the file.

A new variable cannot be added to a struct, a record, or an interface. A new enum cannot be given a base type. An enum whose members share one line cannot be rewritten as a whole.

If you also work in C#: the canvas can represent this target-typed creation as a new object node, wired to the local assignment:

Inside Round Trip, each refusal belongs to one of these categories: UnsupportedConstruct, UnsupportedStatement, PlaceholderPresent, BodyAbsent, MissingSourceMetadata, FormCannotExpressGraph, SegmentationIncomplete, ComposedTextDisagreesWithSource, HandlerStructureInvalid, CatchFilterNotComposable, HandlerBodiesUnresolvable, BranchArmsUnresolvable, BranchConditionMissing, SwitchCaseBodiesUnresolvable, and SwitchJumpTargetMissing. The declaration refusals above cover variables inside #if blocks, partial classes, and multi-variable lines such as int a, b;.

When it goes wrong

SymptomCheckFix
The message says the file changed while compilingSomeone or something saved the script while your draft was open.Undo the draft, let the canvas reload from the new script, and make your change again.
A gray placeholder node blocks the saveRead the reason on the placeholder node.Right-click it, choose Go to source, and change that part in C#; or remove it in C# before building on the canvas.
A variable or enum change refusesRead which declaration the message names.Make that declaration change in C#, then wait for the canvas to reload.
Compile saved the rest, but a message says a node could not be writtenThe node it names is not on the white path: nothing wires it into the execution flow, so no statement holds it. This is not a refusal; everything else in the draft was saved, and that node stays on the canvas, still pending.Wire it into the white path and press Compile again, or delete it if you no longer need it.
Full-size image