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

Check what the AI did

Review an assistant's change on the canvas by its nodes and wires, then keep it or go back to the checkpoint you saved before the assistant started.

An assistant changed a method in your project. Before you keep the change, answer three questions from the canvas: what does it call, what does it change, and where does it stop early?

This review only gives you a way back if you committed before the assistant started. Then the assistant’s work is the only difference from that commit, and you can return to it if the change is wrong. If the assistant has already run without one, commit the project as it is now before you change anything else, so at least this point can be restored; it cannot bring back the version from before the assistant.

This page uses the enemy-stomping method from the Platformer sample, a sample from the optional Round Trip Sample - Platformer package and that you import into a test project, to practice those questions. It is an existing sample method. It is not a recorded AI edit: the captures below use a scripted stand-in, one reworded warning message inside StompEnemy, saved over a Git-committed copy of the sample. Every step names a real class, and the same steps apply when you review an assistant’s changes in any project once its folder is indexed.

A generated change can build and still play the wrong game rule. In the Platformer sample, StompEnemy on PlayerController is a good review example: it starts with a guard, changes the enemy, awards score on one route, and has a second branch inside that route with a warning on each missing piece.

  • An AI assistant edited gameplay and you want to see what it does before you trust it.
  • The change is big enough that you cannot hold the whole behavior in your head.
  • You want to throw the assistant’s change away and go back to the checkpoint you saved before it started.

Review the assistant's change

  1. Open the Graph view

    Let Unity finish importing the assistant’s changes without errors, then open Tools > Round Trip > Graph view.

    Clip: the Unity Tools menu opens, Round Trip opens its submenu and Graph view is chosen. The Tools menu, its Round Trip item and the Graph view command are each highlighted while the pointer is on them. The Round Trip window then opens over the editor.
  2. Open the changed class

    On the top rail, press the modified-classes button, the orange branch icon. Its tooltip reads Show modified classes. Choose the class the assistant touched (in the sample, PlayerController).

    Clip of the whole Graph view: the pointer moves to the modified-classes button, the orange branch icon on the top rail, which is highlighted with an arrow pointing at it. Pressing it opens a list with PlayerController under MODIFIED; that row is highlighted with an arrow while the pointer chooses it, and the left rail then fills with its methods.
  3. Open the changed method and list its calls

    Click the changed method in the left rail (here StompEnemy). Start at the magenta entry node and ask: What does it call? Follow the white wire and name every teal call node on it. In the sample: ChangeState on the enemy, Bounce on the motor, AddScore on the score counter, RefreshCoins on the HUD, and the two LogWarning calls that report a missing piece.

    Clip: the pointer moves to StompEnemy in the left rail, highlighted with an arrow beside it, which carries the M marker for a source change, and clicks it. The canvas draws the method from the magenta entry node.
  4. Read what it changes

    Ask: What does it change? Read each call node’s name and the values wired into it. The enemy’s state pin takes the Defeated pill; the motor bounces; the score grows by the stompScoreValue pill; the HUD refreshes from the Coins and Score pills. The LogWarning calls only report; they change no gameplay values.

    The middle of the StompEnemy diagram. ChangeState takes the enemy pill and the Defeated pill on its state pin, Bounce takes the _motor pill, and AddScore takes the _scoreCounter pill and a green stompScoreValue pill on amount.
  5. Find where it stops early

    Ask: Where does it stop early? Find every magenta EXIT node and follow its white wire back to the yellow node that leads there. In the sample, the first branch’s true output, fed by an OR of two EQUALS nodes (no enemy, or an enemy already Defeated), goes straight to EXIT. No Bounce or AddScore node should sit before it.

    The left part of the StompEnemy diagram. The entry node feeds a BRANCH whose condition is an OR of two EQUALS nodes, one comparing the enemy with null and one comparing its CurrentState with Defeated. The BRANCH true output goes to a magenta EXIT node and false continues to ChangeState.
    The whole StompEnemy diagram. A second BRANCH on _scoreCounter leads on its true side to AddScore and then to a third BRANCH on _hud, whose true side runs RefreshCoins and whose false side runs a LogWarning. The second branch's false side runs a different LogWarning.
  6. Keep the change, or restore the checkpoint

    Compare what you found with the rule you asked for. If it matches, keep it: the change is already in the script, so there is nothing to accept.

    If it is wrong, restore the intended changes from the checkpoint you made before the assistant started, using your version control client or backup. Review the whole file first: restoring a file also removes other changes made in it since that checkpoint. Let Unity import the restored script, then review the canvas again.

    The Round Trip window after the review. In the left rail StompEnemy is selected and marked M, and the PUBLIC group shows one modified method. The toolbar Compile is gray because nothing is pending, and the canvas shows the start of the StompEnemy diagram.
    Clip of the whole window: with the checkpoint restored, StompEnemy has no M marker. The modified-classes button is highlighted with an arrow pointing at it while the pointer presses it, and the Changes list reads No source changes against the workspace baseline.

If you also read C#, use your version control client’s diff to compare the saved file with the checkpoint. Review every changed method in the file.

Practice target

Select a screenshot to enlarge it.

OnCoinCountChanged diagram with a missing-reference EXIT and ShouldUnlock leading to the door branch.
Figure 1. Try the same questions on OnCoinCountChanged A separate method for the exercise above: locate the early stop, follow ShouldUnlock into shouldUnlock, then find the only white route into the door-opening call.

Keep these questions beside the canvas:

  1. What does it call? Name every call node on each white route.
  2. What does it change? Include SET nodes and calls whose names say they change something, then look at what is wired into them.
  3. Where does it stop early? Start from every magenta EXIT node and follow its wire back to the yellow node that decides it.

A fourth question helps with a branch inside a branch: which nodes run only when both answers are yes? In the sample’s StompEnemy, the HUD refresh needs both _scoreCounter and _hud.

When it goes wrong

SymptomCheckFix
Changes says change review is unavailable.Read the provider diagnostic in Changes or its tooltip.Check the repository in your version control client. You can still open the changed class with the class picker and review its current canvas.
There is no Revert Method, Stage or Diff action.Round Trip does not restore, stage or diff saved source; Changes only lists the modified classes.Review the file diff and restore the intended changes with your version control client or backup, then let Unity import the script.
The canvas still shows the older method.Look for a Unity compile or import still in progress.Use Reload on the open method once Unity is ready.
Full-size image