Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Component · ai

Brain

Runs a behaviour on this entity (authoring).

Fields

behavior

option<asset>
Behaviour graph asset (@ai/guard.behavior#gr_...).
default null

overrides

list<string>
Blackboard overrides as name = expression (no IDs), e.g. route = [vec3(0, 0, 4), vec3(8, 0, 4)].
default []

enabled

bool
Whether the brain thinks.
default true

Usage

Every edit is an undoable command: from the CLI as below, or the same JSON from an agent over MCP. See component.add and property.set.

Add it

ara do component.add -p entity=name:Crate -p component=Brain --why "Add Brain"

Set a field

ara do property.set -p entity=name:Crate -p path=Brain.behavior -p value=null --why "Tune Brain"

In a scene document

{
  "Brain": {
    "behavior": null
  }
}

From C#

/// <summary>Pause an NPC brain during a cutscene.</summary>
public static void UseBrain(Entity entity, in Tick tick)
{
    ref var component = ref World.Get<Brain>(entity);
    component.Enabled = false;
}

From C#

Scripts read and write it with Get<Brain>(); see the Brain struct.