# Blackboard

Blackboard manages multiple variables, passing values between graphs and storing temporary values.

## Ability to integrate Blackboard

- Logic Controller
- NodeGraph
- Blackboard Asset

## About the types of variables that can be used

Types that Unity supports serialization can be used for variables.
For details, see Unity - Manual: Script serialization.

## UI description

### (A) Toolbar

There is an add variable button and a search name field.

### (B) Variable name

The type icon and name of the variable type.

### (C) Variable value

Edit field for variable value.

## Method of operation

### Create variable

1. Click the “+” button on the toolbar
2. Select Single or List from the variable type dropdown on the type selection menu toolbar.
   If you select “List”, you can create a list (variable length array) variable.
3. Select the type from the type selection menu.
4. A variable will be created and you will be in name input mode, so enter the name.
5. Confirm with `Enter key`.

### Delete variable

You can delete it using one of the following methods:

- Right-click the variable name and select “Delete” from the menu
- Select the variable and press the `Delete key`

### Reordering

1. Start dragging the variable name
2. Drop it at the new position

### Rename

You can rename it in one of the following ways:

- Right-click on the variable name and select Rename from the menu.
- Click on the variable name to make it active, then click on it again.
- Select the variable name and press `F2` (Win)/`Enter` (Mac).

## Variable access

### How to access

Access Method | Image | Description
--- | --- | ---
Get |  | Outputs the value of the variable to OutputDataPort.
Set |  | Stores the value received from InputField into a variable.
Event |  | Receive an event when the value of a variable changes EventComponent When an event occurs, output the variable value to OutputDataPort and notify the node that an event has arrived.

### Access target

Target | Description
--- | ---
Root | Access variables in the Root of the Blackboard tab. You can access them from the main graph in the root, from graphs created in Functions in the Graphs tab, and from graphs of external objects.
Private | Access the variables in Private in the Blackboard tab. You can access them from the main graph in the root, or from the graph you created in Functions in the Graphs tab.
Local | Access the variable under Local in the Blackboard tab. Accessible only from the current graph selected in the Graps tab.
Data Link | Access the variables in the Data Link of the Blackboard tab. For more information, see DataLink.
External | Accesses the Root variable of an External Object. The Target field must be set to the Logic Player Base instance that you want to access during playback.
Parameter | Access variables in Start Function node of the function graph. Only available in the Task Graph or Evaluate Graph. (You can access it like a Blackboard variable, but it is not strictly related to Blackboard.)

The accessible variables for each target are displayed under (node ​​type, etc.) > Variables > (target type) in the node creation menu.

### Method of operation

To access variables from a graph, you need to open the graph whose variables you want to access in Logic Editor.

To access it, add a node or node component using the following method.

#### Side panel

1. Select Blackboard tab in side panel.
2. Select the Blackboard type tab.
3. Start dragging variables
4. Drop to Graph View
5. Select the node type from the node creation menu.
6. (other than Get access on Compute nodes)Once the node is created, you will be in node name input mode, so enter the name.
   Confirm with `Enter key`.

#### Node creation menu

1. Graph view `Space key`
   Alternatively, right-click and select “Create Node” from the menu.
2. Enter “Variables” in the search field of the node creation menu
3. Select the variables and nodes you want to access.
4. (other than Get access on Compute nodes)Once the node is created, you will be in node name input mode, so enter the name.
   Confirm with `Enter key`.

#### Add component menu

1. Click the “+” button in the node component list such as State node.
2. Enter “Variables” in the search field of the node component addition menu.
3. Select the variables and node components you want to access.