Preview drafts, write focused C# changes, and stay safe when source moves.
Build + UnderstandUpdated
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.
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.
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.