# Global variables

> For the complete documentation index, see [llms.txt](https://docs.arcweave.com/llms.txt). All pages are also available in one file, [llms-full.txt](https://docs.arcweave.com/llms-full.txt).

Source: https://docs.arcweave.com/project-items/variables/global
Section: Project Items > Variables
Description: How to create, manage, and use project-level variables in Arcweave

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

## Global variables list

Context: Arcweave docs > Project Items > Variables > Global variables > Global variables list

To view and manage your project's global variables, click **Global variables** at the bottom of the [left sidebar](https://docs.arcweave.com/project-tools/interface/left-sidebar).

![Arcweave's project environment. An orange arrow points at the Global variables button, at the bottom of the left sidebar.](https://docs.arcweave.com/assets/global-vars-button.DJ5Zg1TN.png)

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.](https://docs.arcweave.com/assets/variables-modal.BmdWUv-m.png)

> ℹ️ A variable's **initial value** is the value it holds at the start of [Play Mode](https://docs.arcweave.com/project-tools/play-mode/overview).

## Create global variables

Context: Arcweave docs > Project Items > Variables > Global variables > 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](https://docs.arcweave.com/project-items/variables/overview#variable-names-and-custom-ids) for the naming rules.

## Use global variables

Context: Arcweave docs > Project Items > Variables > Global variables > 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](https://docs.arcweave.com/project-items/variables/overview#common-use-cases) in the Variables overview page for instructions and examples.

## Search global variables

Context: Arcweave docs > Project Items > Variables > Global variables > 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.](https://docs.arcweave.com/assets/variables-modal-search.CG-v2uBr.png)

## Filter global variables

Context: Arcweave docs > Project Items > Variables > Global variables > 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.](https://docs.arcweave.com/assets/variables-modal-filter.DHE5jeeo.png)

## Reorder global variables

Context: Arcweave docs > Project Items > Variables > Global variables > 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.](https://docs.arcweave.com/assets/variables-reorder.gT9EOVSZ.gif)

## Delete global variables

Context: Arcweave docs > Project Items > Variables > Global variables > 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

Context: Arcweave docs > Project Items > Variables > Global variables > 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.](https://docs.arcweave.com/assets/play-mode-global-variables.DVl9WnDF.png)

See [Play Mode](https://docs.arcweave.com/project-tools/play-mode/overview) > [Debugger](https://docs.arcweave.com/project-tools/play-mode/debugger) for full instructions.
