Component · navigation
NavMeshSurface
Authored raw-geometry navigation surface; its derived mesh is content-addressed.
Fields
profiles
list<u32>Shared bake profiles to generate from this surface.
default []
geometry
option<asset>Source collision geometry asset, resolved by the asset/physics integration.
default null
min
vec3World-space lower bake bound.
default [0,0,0]m
max
vec3World-space upper bake bound.
default [0,0,0]m
cellSize
f32Horizontal voxel size in metres.
default 0.2m0.01 – 10
tileSize
u16Interior tile width in voxels.
default 648 – 256
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=NavMeshSurface --why "Add NavMeshSurface"Set a field
ara do property.set -p entity=name:Crate -p path=NavMeshSurface.profiles -p value=[] --why "Tune NavMeshSurface"In a scene document
{
"NavMeshSurface": {
"profiles": []
}
}From C#
/// <summary>Choose a finer navigation bake cell size.</summary>
public static void UseNavMeshSurface(Entity entity, in Tick tick)
{
ref var component = ref World.Get<NavMeshSurface>(entity);
component.CellSize = 0.25f;
}From C#
Scripts read and write it with Get<NavMeshSurface>(); see the NavMeshSurface struct.