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

Compile

Preview drafts, write focused C# changes, and stay safe when source moves.

On this page

Round Trip treats C# as the source of truth. The canvas can hold a draft, but Compile is the explicit moment that draft becomes code. The file is then imported and read back so the diagram shows what now exists in source.

What happens when Compile writes a visual draftFour stations show a draft in memory moving through Compile, one changed C# line, and a diagram rebuilt from source. A token visits each station. A side path shows that a placeholder node is refused and leaves the file unchanged. The final frame holds the token at Re-parse and reports that the source is unchanged except for one line.1Draft(memory)2Compilecheck the draft3Smallest editto the .cs- AddCoins(1) + AddCoins(2)4Re-parseview from sourceplaceholder noderefuses, file unchangedsource unchanged except one lineWhat happens when Compile writes a visual draftFour stations show a draft in memory moving through Compile, one changed C# line, and a diagram rebuilt from source. A token visits each station. A side path shows that a placeholder node is refused and leaves the file unchanged. The final frame holds the token at Re-parse and reports that the source is unchanged except for one line.1Draft(memory)2Compilecheck the draft3Smallest editto the .cs- AddCoins(1) + AddCoins(2)4Re-parseview from sourceplaceholder noderefuses, file unchangedsource unchanged except one line
This example changes one literal. Compile writes the draft to the real script, then rebuilds the diagram from the saved C#.
  • Preview and Compile covers the draft banner and the toolbar Compile, plus undo and save shortcuts.
  • What gets written explains changes to individual declarations and statements, whole-method rewrites, and settings that affect only the diagram.
  • When Compile refuses lists the source shapes Round Trip names and leaves unchanged.
  • Edits from outside follows file watching, Unity import, focus checks, and concurrent-edit protection.
Code and visual scripts in one loop, on PlayerController.CollectCoin in the Platformer sample: open the method, edit its C#, create a new method visually, then Compile the draft into the file.
Code and visual scripts in one loop, on PlayerController.CollectCoin in the Platformer sample: open the method, edit its C#, create a new method visually, then Compile the draft into the file.

The important loop is visible: open source as a diagram and draft a change. Inspect it before you Compile. Round Trip then reads the saved source back into the canvas. A refusal does not write a partial answer. It keeps the draft available and the file unchanged.

Full-size image