Node groups
What this page is for
Section titled “What this page is for”A node group puts a name, a colour and a frame around some nodes of a scheme. A collapsed group is one small card, so a big scheme fits on the screen. Groups are for you only: they do not change how a scheme runs.
When you come here
Section titled “When you come here”- A scheme has grown too big to read.
- You want to name a part of it, such as “Pay the guard”.
- You want to look at one part and dim the rest.
- You want to fold every part away to see the shape of the scheme.
What you see
Section titled “What you see”A group is shown as a frame, or, when it is collapsed, as a card. Only scheme canvases have groups.
- Start, output Start, goes to Wait.
- Wait goes to Set Variable.
- Set Variable goes to Chance.
- Chance, output Success, goes to Succeed Scheme.
- Chance, output Failure, goes to Fail Scheme.
- Group The guard is collapsed into one card: 3 nodes.
- Start, output Start, goes to The guard.
- The guard, output Chance ▸ Success, goes to Succeed Scheme.
- The guard, output Chance ▸ Failure, goes to Fail Scheme.
The card has these parts:
- The name and the colour of the group.
- 1 node, or the number of nodes, such as 3 nodes.
- The note, when there is one.
- A badge when a node inside has a problem, with the number of nodes that have one. See Problems, notes and validation.
- An expand button. Its hover text is Expand: show the nodes of this group.
- Entry rows on the left: one for each node of the group that a node outside links to.
- Exit rows on the right: one for each output of a node in the group that links to a node outside, written as the node’s title, ▸ and the output name (Chance ▸ Success). A node with one output shows only its title.
Collapsing never moves a node.
Do it, step by step
Section titled “Do it, step by step”Group nodes
Section titled “Group nodes”Select the nodes. Press Cmd or Ctrl plus GCmdCtrlG, or right-click a node and choose Group Nodes. A frame appears around them, named Group, with its title ready to type: type a name and press Return.
If one frame is also selected, the nodes join that group instead. A node belongs to one group, so a node already in another group leaves it.
Dragging works too. Drag the selected nodes into a frame to add them.
To undo, use Undo in Unity’s Edit menu. The undo steps are named for the command: Group Nodes, Add to Group, Remove from Group, Ungroup, Delete Group and Nodes, Rename Group, Change Group Colour, Change Group Note, and Collapse Group or Expand Group (Groups when several change).
Add nodes to a group, or take them out
Section titled “Add nodes to a group, or take them out”Select the nodes. Right-click one and open Add to Group, which lists every group by name, and pick one. To take nodes out, choose Remove from Group. That entry shows only when a selected node is in a group. A group left with no node is removed.
You can also drop nodes into a frame, and drag them out of it with ShiftShift held. That drag is Unity’s own GraphView behaviour, which the Studio listens to.
To undo, use Undo in Unity’s Edit menu.
Collapse and expand a group
Section titled “Collapse and expand a group”Select a frame, a card, or a node of the group, then press Cmd or Ctrl plus ECmdCtrlE. The group collapses, or expands when every selected group is collapsed already. You can also use Collapse or Expand in the group’s menu, the button in the group’s inspector, or the chevron in its row on the Groups tab.
Selected. Three linked nodes are selected.
- Start, output Start, goes to Wait.
- Wait goes to Set Variable.
- Set Variable goes to Chance.
- Chance, output Success, goes to Succeed Scheme.
- Chance, output Failure, goes to Fail Scheme.
Grouped. The three nodes are framed in a group called Group.
- Start, output Start, goes to Wait.
- Wait goes to Set Variable.
- Set Variable goes to Chance.
- Chance, output Success, goes to Succeed Scheme.
- Chance, output Failure, goes to Fail Scheme.
Collapsed. The group is one card that says 3 nodes; the wires meet its rows.
- Group Group is collapsed into one card: 3 nodes.
- Start, output Start, goes to Group.
- Group, output Chance ▸ Success, goes to Succeed Scheme.
- Group, output Chance ▸ Failure, goes to Fail Scheme.
The figure is this page’s own illustration. The Studio shows the frame and the card at once; the slide is not the Studio’s.
When the graph can be edited, the state is saved in your database, as one undo step. In Play mode, while a test run locks the scheme, and in a graph that cannot be edited, the change lasts only for the session and nothing is written.
Find and the Problems counter open a collapsed group for the session when they have to show a node inside it. Nothing is written then.
To undo, use Undo in Unity’s Edit menu. Pressing the key again collapses or expands it back.
Collapse or expand every group
Section titled “Collapse or expand every group”Right-click the empty canvas and choose Collapse All Groups or Expand All Groups. These entries show only when the scheme has groups. The Groups tab has the buttons Collapse All and Expand All. Hover text: Show every group as a card. and Show every group with its nodes.
Each is one undo step.
Ungroup
Section titled “Ungroup”Press Cmd or Ctrl plus Alt or Option plus GCmdCtrlAltOptionG. Selected frames are removed and selected nodes leave their groups, and the nodes stay where they are. The group menu has Ungroup, and the inspector has an Ungroup button with the hover text Removes the group; its nodes stay where they are.
Delete Group and Nodes, in the group menu, deletes the group and its nodes. A node that cannot be deleted, such as Start, stays.
To undo, use Undo in Unity’s Edit menu.
Use the group menu
Section titled “Use the group menu”Right-click a frame, a card, or a row of the Groups tab.
- Rename lets you type the name in place. In the inspector, Name has the hover text The name shown on the frame. and Colour has The colour of the frame.
- Colour has nine colours: Default, Red, Orange, Yellow, Green, Teal, Blue, Purple and Pink. The inspector has a swatch for each, with the name as hover text.
- Select Nodes selects the nodes of the group instead of its frame.
- Copy, Cut and Duplicate work on the selected frame or card.
Focus on one group
Section titled “Focus on one group”Choose Focus in the group menu, or click the focus button in the group’s row on the Groups tab. Everything that is not in the group is dimmed, and the view frames the group. A collapsed group opens while it has the focus and collapses again when you leave.
Press EscapeEscape or choose Leave Focus to leave. Focus on another group moves the focus. Focus writes nothing and is not an undo step, and it ends when you load another graph.
Hover text of the focus button: Focus: dim everything that is not in this group. Esc leaves Focus. While a test run is shown on the canvas, Focus is off. The hover text then reads Focus is not available while a test run is shown.
Use the Groups tab
Section titled “Use the Groups tab”The Library has a Groups tab, with one row for each group of the open scheme.
- The row shows the colour, the name, the number of nodes, a badge if a node inside has a problem (1 node has a problem. or a number followed by nodes have a problem.), a focus button and a chevron (hover text Collapse: show this group as a card. or Expand: show the nodes of this group.).
- Click a row to frame the group. Double-click to rename it. A row’s hover text is the group’s note.
- The filter box shows only the groups whose name or note contains the text. Hover text: Show only the groups whose name or note contains this text.
- The buttons Collapse All and Expand All act on all groups.
With no group, the tab says No groups yet. Select nodes and press Cmd+G. on macOS and No groups yet. Select nodes and press Ctrl+G. elsewhere. A filter with no match says No group matches the filter.
See The Library.
Name, colour and note
Section titled “Name, colour and note”Select a group. The Element Inspector shows Name, Colour, Note, the number of nodes (1 node or 3 nodes), and the buttons Collapse (or Expand), Select Nodes and Ungroup. The hover text of Collapse is Shows this group as one small card that lists its entries and exits.
An empty name is ignored. Two groups can have the same name. See Comments and notes.
Keep groups together with Compact Layout
Section titled “Keep groups together with Compact Layout”Right-click the empty canvas of a scheme and choose Compact Layout. It is off with one node or fewer. It arranges the nodes and keeps each group together as a block. A collapsed group counts as the size of its card. The whole command is one undo step.
When a group cannot be kept together without changing the order in which a node’s links run, the Studio arranges its nodes like nodes outside a group. A notice and a line in the Console tell you which group, and end with Its nodes were arranged like nodes outside a group.
Compact Layout is refused while a test run locks the scheme.
To undo, use Undo in Unity’s Edit menu.
How it connects
Section titled “How it connects”You come from Comments and notes. The next lesson is The Library.
For folded lines, see Folding: Then also. For copying, see Copy, paste, duplicate and undo.
Settings on this page
Section titled “Settings on this page”This page has no setting. The state of a group (collapsed or not), its colour, name and note are saved in your database.
Mistakes and messages
Section titled “Mistakes and messages”Group Nodes is grey. No node is selected, or the graph cannot be edited. Groups also never show on a clan or family page.
A node I added to a group left another one. A node belongs to one group.
Focus is grey. A test run is shown on the canvas. Clear it first.
Compact Layout is not in the menu. It is on scheme canvases only. Right-click the empty canvas.
I changed a group during a test run and nothing was saved. While a run locks the scheme, collapse and expand last only for the session.
| Message | Where it shows | What to do |
|---|---|---|
| No groups yet. Select nodes and press Ctrl+G. (Cmd+G on macOS) | Groups tab | Select nodes and group them. |
| No group matches the filter. | Groups tab | Clear the filter. |
| Focus is not available while a test run is shown. | Hover text of the focus button | Clear the test run. |
| Stop the run to edit. | A short notice, when you edit a group during a test run | Stop the run. |