Component · navigation
NavArea
Area label and cost policy for the collision-geometry producer and query filters.
Fields
area
u8Semantic area ID, from 0 through 15.
default 00 – 15
name
stringInspector name (for example Ground, Water or Hazard).
default ""
cost
f32Default query traversal cost; agents can override it in their state filter.
default 11 – 1000000
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=NavArea --why "Add NavArea"Set a field
ara do property.set -p entity=name:Crate -p path=NavArea.area -p value=0 --why "Tune NavArea"In a scene document
{
"NavArea": {
"area": 0
}
}From C#
/// <summary>Make agents prefer routes around a hazardous area.</summary>
public static void UseNavArea(Entity entity, in Tick tick)
{
ref var component = ref World.Get<NavArea>(entity);
component.Cost = 3f;
}From C#
Scripts read and write it with Get<NavArea>(); see the NavArea struct.