Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Component · terrain

Terrain

Puts a .terrain heightfield (and its .foliage scatter) in play: rendered by the landscape renderer, walkable for navigation, solid where TerrainChunks exist.

Fields

terrain

option<asset<terrain>>
The heightfield manifest (.terrain document).
default null

foliage

option<asset<foliage>>
Scatter rules over it (.foliage document), drawn by the landscape renderer.
default null

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=Terrain --why "Add Terrain"

Set a field

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

In a scene document

{
  "Terrain": {
    "terrain": null
  }
}

From C#

/// <summary>Bind the terrain asset used by a world cell.</summary>
public static void UseTerrain(Entity entity, in Tick tick)
{
    ref var component = ref World.Get<Terrain>(entity);
    component.TerrainAsset = "@terrain/island.terrain#te_island";
}

From C#

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