Blackboard

The blackboard add-on is included by default in the Databrain package

The blackboard add-on supports the following types by default:

  • Boolean

  • Float

  • Float List

  • Integer

  • Integer List

  • String

  • Vector2

  • Vector3

  • Prefab (GameObject)

Add Types

You can easily add additional types by inheriting from BlackboardGenericVariable<T>

public class BooleanVariable : BlackboardGenericVariable<bool> {}

Custom enum:

public class EnumVariable : BlackboardGenericVariable<MyEnum>
{
    public enum MyEnum
    {
        A = 0,
        B = 1,
        C = 2
    }
}

Value

When getting the value of a blackboard variable you will automatically receive the runtime value. You don't have to call GetRuntimeDataObject() on the blackboard variable object.

Example code:

On Value Changed

You can assign a blackboard event to a blackboard variable which gets called when the value has been changed. See the following example:

Last updated