When it refuses
Read the refusal message, find the node it names, and fix, undo, or finish that part in C#.
On this page
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.
What it does
Section titled “What it does”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.
When to use it
Section titled “When to use it”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.
What it looks like
Section titled “What it looks like”
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.
How to use it
Section titled “How to use it”Read a refusal and get past it
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.
Compile again
Press Compile again.
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.
3 stepsFull size ↗Finish it in C#
Make that change in C#, save, and return to Unity.
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.
Reasons a method body cannot be written
Section titled “Reasons a method body cannot be written”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’soutargument is an output pin now and is written, so this names areforinargument, or anoutpin that records no variable to fill),a call to a method taking a params argument list,a lambda passed as an argument, anda 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, andan assignment with no value input - Loops:
a loop built on the canvas whose body was never recorded,a loop with no condition to test, anda 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, anda 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, anda 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, andan 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.
When declarations cannot be changed
Section titled “When declarations cannot be changed”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.
What it writes
Section titled “What it writes”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
Section titled “When it goes wrong”When it goes wrong
| Symptom | Check | Fix |
|---|---|---|
| The message says the file changed while compiling | Someone 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 save | Read 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 refuses | Read 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 written | The 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. |




