# Blackboard

## Overview

The **Blackboard** module adds a virtual blackboard to your project, allowing you to write data to it, which other objects can be notified about, or read the values of.

Essentially, the **Blackboard** allows objects to pass data into a central repository which other objects can then retrieve, without having to talk to each other. The **Blackboard** module will also notify objects that follow specific *topic*/*subject* values, or subscribe to events that are passed into the **Blackboard**.

{% embed url="<https://youtu.be/qdN1BkWg9Jo>" %}
This video demonstrates basic use of the Blackboard with the creation of the Blackboard Demo Scene.
{% endembed %}

{% hint style="success" %}

### Static reference to Blackboard is MainBlackboard

You are able to have multiple `Blackboard` objects in your scene. To help keep the required blackboard separated, the static reference to it is `MainBlackboard`.

The `Blackboard` prefab in the `_Repository Prefabs` folder has a `MainBlackboard` component on it, which creates the static reference to this objects `Blackboard`, which you can access with `MainBlackboard.blackboard`.
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=Z24cqqMmONk>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infinitypbr.gitbook.io/magic-pig-games/game-modules-4/module-documentation/blackboard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
