Skip to content

Global variables ​

Global variables are project-level variables that are not owned by a board or component. They are accessed without a scope.

Global variables list ​

To view and manage your project's global variables, click Global variables at the bottom of the left sidebar.

Arcweave's project environment. An orange arrow points at the Global variables button, at the bottom of the left sidebar.

This opens the global variables list, which includes the project's global variables along with their name, type, and initial value.

The Global variable dialog in Arcweave, showing all the global variables of a project.

ℹ️ A variable's initial value is the value it holds at the start of Play Mode.

Create global variables ​

To create a new variable follow the next steps:

  1. Click Global variables at the bottom of the sidebar to open the Global variable dialog.
  2. Click + New variable.
  3. Enter a unique variable name.
  4. Select the variable's type from the dropdown menu.
  5. Enter its initial value.

ℹ️ Arcweave will prevent you from entering an invalid initial value for a variable's type (e.g. a string like "John Smith" for an integer).

See Variable names and custom IDs for the naming rules.

Use global variables ​

Global variables are accessible from anywhere in the project using just their name, e.g. score += 2. An unqualified name always resolves a global variable, never a board or component variable.

See Common use cases in the Variables overview page for instructions and examples.

Search global variables ​

To locate a variable in the global variables list, start typing its name in the search field at the top of the Global variable dialog.

The Global variable dialog in Arcweave, demonstrating the search function. The user has typed "play" in the search field, making only the variables player_health and player_roll appear in the list.

Filter global variables ​

For type-specific searches, you can filter your variables list by type:

  1. Click the Filter icon at the right of the search field, at the top of the Global variable dialog.
  2. Select the variable types you want to add to the search.

The Global variable dialog in Arcweave, demonstrating how to filter variables by type. The filter for "string" has been selected, showing only string variables in the list.

Reorder global variables ​

To reorder variables:

  1. Click Global variables at the bottom of the sidebar to open the Global variable dialog.
  2. Click and hold the handle icon at the beginning of the variable's row.
  3. Drag and drop the row to the desired position.

The Global variable dialog in Arcweave, demonstrating how to reorder variables by dragging and dropping.

Delete global variables ​

  1. Click Global variables at the bottom of the sidebar to open the Global variable dialog.
  2. Locate the variable in the list.
  3. Click the three dots icon at the end of its row.
  4. Select Delete variable.

Global variables in Debugger ​

When in Play Mode, you can monitor the global variables and their values in the Debugger.

Arcweave's Play Mode environment, with the Debugger sidebar open on the right. An orange rectangle emphasizes the list of the project's global variables.

See Play Mode > Debugger for full instructions.