Skip to content

Comments and notes

A big scheme needs words next to the nodes. You can leave a Comment node on the canvas, write a note on any node, or give a node group a one-line note. A Log node writes a message while the scheme runs.

  • You want to explain a choice to your future self.
  • You want to mark a part of a scheme, such as “the safe road”.
  • You want to see in the Console, or in a test run, that a scheme reached a point.
The guard
Gold first, then the dice
Start
Wait
3 sec
Only one roll for the whole scheme.
Chance
35% chance
Success
Failure
Succeed Scheme
Result: Success (ends when its flows end)
Fail Scheme
Result: Failure (ends when its flows end)
The bribe is the safe road. Chance is the loud one.
  • Start, output Start, goes to Wait.
  • Wait goes to Chance.
  • Chance, output Success, goes to Succeed Scheme.
  • Chance, output Failure, goes to Fail Scheme.
  1. Comment node. A block of text with no ports. It never runs.
  2. Note on a node. Written in the Element Inspector. It shows above the card.
  3. Note on a group. One line under the group name.
The sample scheme has a Comment node, a note on the Chance node, and a group with a note. The Comment node's bubble tail is not drawn.

A Comment node is a tinted block with no header and no ports. A node’s note shows above its card. A group’s note shows under its name.

Right-click the canvas and choose Add Node. (Unity’s graph view also opens it with Space.) Open the group Notes and pick Comment. The node has no input and no output, so it never runs and no flow can reach it.

Select the node. The Element Inspector has two rows:

  • Text: the comment. The canvas shows the text on the block. An empty comment shows the word Comment.
  • Tail: None, Left or Right. It sets the side of a speech-bubble tail.

The Comment node exists on scheme canvases only. Find searches its text, so a comment can be found like a node. See Move around the canvas and Add and connect nodes.

To undo, use Undo in Unity’s Edit menu, or delete the node.

Select a node. At the bottom of the Element Inspector, click Add a note. A field named Note opens. The link’s hover text is Write a note for yourself, shown above the node. The field’s is A note for yourself, shown above the node.

The note shows above the node’s card on the canvas. Leave the field empty and click away, and it turns back into the Add a note link.

A Comment node is its own note. It gets a Note field only when it already has a note. Find also searches notes: its hover text is Find nodes by title, summary or comment.

Add a note is off while the graph cannot be edited. To remove a note, clear the field.

Select a group by its frame (or its card, when it is collapsed). The Element Inspector shows the group: Name, Colour and Note. The hover text of Note is One line about this part of the scheme, shown under the name.

The note shows under the group’s name, on the frame and on the card. On the Groups tab of the Library, it is the hover text of the group’s row, and the filter box searches names and notes. See Node groups and The Library.

To remove a note, clear the field.

Add a Log node from the group Notes. It has one input and one output, Out. In the Element Inspector you set:

  • Message: the text. Tokens such as {conspirator.Name} or {world.Gold} are filled in.
  • Also In Released Games: off at first. Off, the message is written in the editor and in development builds only. On, it is also written in released games, where it goes to the player’s log file.

The node writes the message to the Unity Console, even when debug logging is off. The card shows the message on its first line. With an empty message the card reads Empty message and the node shows the warning The message is empty.

A Log node can be folded into a line under its card. See Folding: Then also.

In a test run, the run’s Log shows the same text with Log: in front. See Test run: play a scheme in the Studio.

To undo, delete the node.

You come from Copy, paste, duplicate and undo. The next lesson is Node groups.

Notes are not problems. The Studio writes its own notes about a scheme’s structure. See Problems, notes and validation.

Nodes named here: Comment, Log.

This page has no setting. The fields of the two nodes are above.

Field Node Default
Text Comment Empty
Tail Comment None
Message Log Empty
Also In Released Games Log Off

My comment does nothing. That is right. A Comment node never runs. Use a Log node to write a message while the scheme runs.

I cannot find the note field on a Comment node. The comment text is the note.

My Log message does not show in a released game. Turn on Also In Released Games.

Message Where it shows What to do
The message is empty. Badge of a Log node Write a message.