Build it visually, then Compile
Wire a value into a node on the canvas, swap it back to a typed value, preview the draft, and Compile one focused change.
On this page
Change one input on the canvas and watch the script change only when you ask it to. You will feed a Log node’s message from a wire, see how a wired pin behaves, put a typed value back, and Compile the result. This is the shortest tutorial, so it is a good first one: every step names the click. Your first class comes next and builds a whole behavior from an empty class.
The words in this tutorial
Section titled “The words in this tutorial”Every word in this table is something you will see on screen. Skim it now and come back when a step uses a word you have forgotten. The pictures come from Your first class, so they show its Movement class; here you build CoinAnnouncer.
Words used in this tutorial
Before you start
Section titled “Before you start”This page works on a small component called CoinAnnouncer with one method, AnnounceCoin, that logs a message. Build it in a practice project in a couple of minutes. Steps 1 to 5 below are that setup; steps 6 to 12 change the message.
Build the practice component
Create the class
In Tools > Round Trip > Graph view, press the + beside the class chip, name the class
CoinAnnouncer, choose MonoBehaviour and press Create.
4 stepsFull size ↗Add the method
Press + on Methods, type
AnnounceCoinand press Enter.
3 stepsFull size ↗Log a message
Right-click the canvas and pick Log under logging. Wire the entry node’s white Exec pin into it. Click its message pin and type
"Hello from Round Trip", quotes included, then press Enter. Press Compile so the script holds the new method.
7 stepsFull size ↗Call it from Start
Press + on Lifecycle and choose Start(). Right-click its canvas and type
AnnounceCoin, then click the row that appears. Wire Start’s Exec into the new node and press Compile.
7 stepsFull size ↗Add it to a GameObject
Add CoinAnnouncer to any GameObject with Add Component. When you press Play, the Console shows
Hello from Round Trip.
4 stepsFull size ↗
The task
Section titled “The task”The Log node in AnnounceCoin prints a message you typed. You want it to print the name of the GameObject the component sits on, so each announcer says which coin it belongs to. That means replacing a typed value with a wire, and knowing how to go back.
When this applies
Section titled “When this applies”- You want to try a different value on a node without rebuilding the method.
- A node already exists and only one of its inputs should change.
- You want a draft you can undo before it touches the script.
Replace the typed message with a wire
Open the method
Open Tools > Round Trip > Graph view. Open the class picker by pressing the class chip at the top left (Cmd/Ctrl+O does the same), choose CoinAnnouncer, then select AnnounceCoin in the Methods section of the left rail. The canvas shows the magenta entry node wired to your Log node, with your text in its message box.
8 stepsFull size ↗Place the name value
Right-click blank canvas and press get on the name row under VARIABLES. If the class has many variables, type
namein the search box first; the name row stays at the top of the list. A pink pill labeled name appears. Pink is the color of text values.
3 stepsFull size ↗Wire it into message
Drag from the pill’s output pin onto the Log node’s message pin. A pink wire joins them.
2 stepsFull size ↗
Compile and run it, then go back to typed text
Compile
Press Compile in the toolbar.
Press Play
Press Play. The Console now shows the name of each GameObject that carries a CoinAnnouncer.
Break the wire
Go back to a typed message. Stop Play, then hold Alt and click the pink wire. The wire disappears and message is unwired again.
3 stepsFull size ↗Type the message again
Click the empty message pin. Its text box opens; type
"A coin is ready", quotes included, and press Enter or click away. The box and the pin turn pink, the color of text. Press Compile, and the canvas reloads showing the typed text on the pin.
3 stepsFull size ↗
What it writes
Section titled “What it writes”If you also work in C#, after step 9 the call in CoinAnnouncer.cs reads:
After step 12 the same line carries your typed text again. Only that one argument changes each time; the rest of the method stays as it was.
Undo before Compile, revert after
Section titled “Undo before Compile, revert after”Before Compile, press Cmd/Ctrl+Z. Each press steps one edit back through the draft, newest first: in steps 11 and 12, the typed text goes first, then the broken wire comes back. The script is untouched while you do this. To discard the pending C# edits and restore the diagram from the current source file, use Revert on the Previewing your changes. panel instead.
After Compile, Undo cannot take the change back: the change is in the script file, and saving it clears the undo history. To go back, change the canvas again and press Compile, or restore the file from your last commit (Protect your game files shows how).
When it goes wrong
Section titled “When it goes wrong”When it goes wrong
| Symptom | Check | Fix |
|---|---|---|
| Clicking the message pin opens no text box. | Look for a colored wire still attached to the pin. | Alt-click that wire or use Break link, then click the unwired pin. |
| Compile stays grayed out after typing the text. | Make sure the text box closed; press Enter if it is still open. | Hover Compile; its tooltip says when a pending change needs attention. |
| The typed message stays marked invalid with Text must be quoted. | The message pin takes any value, so text needs quotes to say it is text. A bare 5 or true is a number or a yes-or-no instead. | Type it as the hint suggests, in double quotes, such as "A coin is ready", and press Enter. |
- Your first class: build a whole behavior from an empty class, with a Move control and a Jump button.
- Check what the AI did: review a larger change on the canvas.
- Pills and literals: see when a pin takes a typed value.
- Changes and history: inspect, compare, and revert files.









