C# is the truth
Why Round Trip writes ordinary C# instead of its own format, and how source, visual drafts and layout files fit together.
On this page
Most visual scripting tools store your logic in their own asset format and run it through their own runtime. Leave the tool and the logic goes with it. Round Trip takes the other path: the C# file is authoritative. Round Trip parses that file to draw a diagram. Visual edits are drafts until you press Compile. Compile updates the real C# file in your project and Round Trip parses it again. No separate executable format needs syncing, and a game built on the canvas compiles without the package installed. Because the file is the truth, a mistake that reaches it is a mistake in your game, so protect your game files before you edit.
That is what lets you work in code, on the canvas, or both. A programmer can type in an IDE while a designer drags on the canvas, and the same file is what Unity compiles.

Each stage is parsed from C#: the picture is a view of the script, not a separate executable asset.
What lives where
Section titled “What lives where”| Place | What belongs there |
|---|---|
| C# file | Classes and members, method bodies and comments, plus every behavior Unity compiles. This is the truth Round Trip reads. |
.rt.json layout and configuration file |
Node positions and viewport, wire knots, split or merged reads, collapse state and comment popup placement. It changes how the diagram drawn from source is arranged. |
ProjectSettings/RoundTripSettings.asset |
Team-wide include paths and layout storage scope, plus the version-control baseline and project behavior settings for guards, lifecycle recognition and Field defaults. |
| Unity EditorPrefs through Preferences > Round Trip | Per-user appearance and interaction preferences, including theme, canvas, zoom, grid, wire routing and wire visuals. |
Local layout and configuration files live under <Project>/UserSettings/RoundTrip. Shared files live under <Project>/RoundTrip.
When the file changes in your IDE
Section titled “When the file changes in your IDE”If the file sits under Assets, Unity’s import and refresh process marks the index for updating. Round Trip reads the new file, rebuilds the selected method’s diagram and replaces the nodes drawn from source with what the code now says.
The open diagram therefore follows the file. A node or pill does not get to keep an older answer after the source has changed.
When you press Compile
Section titled “When you press Compile”Round Trip validates the pending draft and chooses the smallest safe edit it can. A literal may replace one expression span. A rename may replace one identifier. A change to the visual script’s structure may regenerate a method body. The writer reads the current file and performs an atomic overwrite, replacing the file in one operation. It imports the result and re-indexes it, then parses it again.
The re-parse matters. The diagram after Compile is not a visual guess about what should have been written. It is a fresh view of the C# that reached disk.
If the file changes during Compile
Section titled “If the file changes during Compile”Round Trip compares the file it planned against with the file on disk. If another tool changes it first, the write stops, the other tool’s change stays in the file, and your draft stays on the canvas unsaved. The message names the file:
{file} changed while compiling; discard and try Compile again.
Let the canvas reload the current source, discard the stale draft, make the visual edit again and press Compile. Round Trip does not merge two competing edits by guessing which one you meant.
- Preview and Compile: follow the controls and status messages.
- Edits from outside: work between an IDE and the canvas.
- Layout and configuration files: choose local or shared layout storage.