The block context menu gives you quick access to common actions for working with blocks in your Flock XR code.
Select a block in the code area to display the context menu.
The block context menu will appear as a row of icons just above the block.
The menu also appears when you drag a block to an active stack.
Context menu options
The options that appear depend on the block you have selected and whether it is part of an active stack.
Duplicate
The Duplicate button has an icon showing two pages.
Select it to create a copy of the block. The duplicate is placed as an inactive block in the code area, close to the original.
You can then move or connect the duplicate wherever you need it.
Unlink
The Unlink button has a broken chain icon.
Select it to remove the block from its current stack without deleting it.
The block is placed in the code area as an inactive, unconnected block.
This is useful when you want to reorganise your code or temporarily remove a block from a stack.
Add or remove a comment
The Comment button has a speech bubble icon.
Select it to add a comment to a block. You can type useful information into the comment to explain what the block or part of your code does.
If the block already has a comment, the speech bubble icon has a line through it. Select it to remove the comment.
Disable or enable a block
Select the Disable button, shown as a no entry sign, to disable a block without removing it from your code.
The block stays in the same position in the stack, but Flock XR skips over it when the code runs.
This is useful for testing and debugging because you can temporarily stop a block from running without having to delete it.
When a block is disabled, the button changes to a tick. Select the tick to enable the block again.
Delete
Select the Delete button, shown as a trashcan, to remove the block from the code area.
The deleted block is moved to the trashcan.
Focus on an object
Object blocks also have a Focus button, shown as an eye icon.
Select Focus to move the camera so that it focuses on the related object in the Canvas.
This can be useful when you’re working with a busy 3D scene and want to quickly find the object represented by a particular block.
Context menu options for unconnected blocks
If a block is in the coding area but isn’t connected to an active stack, fewer context menu options are needed.
Select the block to access:
- Comment
- Duplicate
- Delete
Connect the block to an active stack to access any additional actions that are available for that block.
