editor.landscape

Landscape creation and terrain editing

← API Reference

editor.landscape.getInfo

Returns information about a landscape actor including bounds, material, and edit layers.

Parameters:

NameTypeRequiredDescription
actor_namestringYesLandscape actor name or label

Returns:

NameTypeDescription
actor_namestringActor name
actor_pathstringFull object path
component_countnumberNumber of landscape components
boundsobject{min_x, min_y, min_z, max_x, max_y, max_z}
material_pathstringAssigned material path
has_edit_layersboolWhether edit layers are enabled
num_layersnumberNumber of edit layers

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.getInfo", "params": { "actor_name": "Landscape" } }

editor.landscape.getComponents

Returns all landscape components with their section bases and bounds.

Parameters:

NameTypeRequiredDescription
actor_namestringYesLandscape actor name or label

Returns: components (array of {component_name, section_base_x, section_base_y, bounds}), count (number)

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.getComponents", "params": { "actor_name": "Landscape" } }

editor.landscape.setMaterial

Sets the landscape material and updates all component material instances.

Parameters:

NameTypeRequiredDescription
actor_namestringYesLandscape actor name or label
material_pathstringYesMaterial asset path

Returns: success (bool), material_path (string)

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.setMaterial", "params": { "actor_name": "Landscape", "material_path": "/Game/Materials/M_Terrain" } }

editor.landscape.setMaterialParam

Sets a material parameter (scalar, vector, or texture) on the landscape material.

Parameters:

NameTypeRequiredDescription
actor_namestringYesLandscape actor name or label
param_namestringYesParameter name
param_typestringYes"scalar", "vector", or "texture"
valuevariesYesnumber (scalar), {r,g,b,a} (vector), or string path (texture)

Returns: success (bool), param_name, param_type

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.setMaterialParam", "params": { "actor_name": "Landscape", "param_name": "TerrainScale", "param_type": "scalar", "value": 2.0 } }

editor.landscape.getLayers

Returns all edit layers for a landscape.

Parameters:

NameTypeRequiredDescription
actor_namestringYesLandscape actor name or label

Returns: layers (array of {layer_name, layer_guid, is_visible, is_locked}), count (number)

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.getLayers", "params": { "actor_name": "Landscape" } }

editor.landscape.createLayer

Creates a new edit layer on the landscape.

Parameters:

NameTypeRequiredDescription
actor_namestringYesLandscape actor name or label
layer_namestringYesName for the new layer

Returns: success (bool), layer_index, layer_guid, layer_name

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.createLayer", "params": { "actor_name": "Landscape", "layer_name": "Roads" } }

editor.landscape.setEditingLayer

Sets the currently active editing layer by GUID.

Parameters:

NameTypeRequiredDescription
actor_namestringYesLandscape actor name or label
layer_guidstringYesGUID of the layer to activate

Returns: success (bool), editing_layer_guid (string)

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.setEditingLayer", "params": { "actor_name": "Landscape", "layer_guid": "A1B2C3..." } }

editor.landscape.importHeightmap

Imports heightmap data from a render target.

Parameters:

NameTypeRequiredDescription
actor_namestringYesLandscape actor name or label
render_target_pathstringYesRender target asset path
import_from_rg_channelboolNoImport from RG channels (default false)
edit_layer_indexnumberNoTarget edit layer index (default 0)

Returns: success (bool)

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.importHeightmap", "params": { "actor_name": "Landscape", "render_target_path": "/Game/RenderTargets/RT_Height" } }

editor.landscape.exportHeightmap

Exports heightmap data to a render target.

Parameters:

NameTypeRequiredDescription
actor_namestringYesLandscape actor name or label
render_target_pathstringYesRender target asset path
export_to_rg_channelboolNoExport to RG channels (default false)
export_proxiesboolNoInclude streaming proxies (default true)

Returns: success (bool)

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.exportHeightmap", "params": { "actor_name": "Landscape", "render_target_path": "/Game/RenderTargets/RT_HeightExport" } }

editor.landscape.importWeightmap

Imports weightmap data from a render target for a specific paint layer.

Parameters:

NameTypeRequiredDescription
actor_namestringYesLandscape actor name or label
render_target_pathstringYesRender target asset path
layer_namestringYesPaint layer name
edit_layer_indexnumberNoTarget edit layer index (default 0)

Returns: success (bool)

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.importWeightmap", "params": { "actor_name": "Landscape", "render_target_path": "/Game/RenderTargets/RT_Grass", "layer_name": "Grass" } }

editor.landscape.build

Rebuilds landscape features (grass, Nanite, physics, or all).

Parameters:

NameTypeRequiredDescription
build_typestringNo"all", "grass", "nanite", or "physics" (default "all")

Returns: success (bool), build_type (string)

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.build", "params": { "build_type": "grass" } }

editor.landscape.getFoliageTypes

Returns all foliage types defined in the instanced foliage actor.

No parameters.

Returns: foliage_types (array of {type_name, mesh_path, actor_class, instance_count, foliage_type_path}), count (number)

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.getFoliageTypes" }

editor.landscape.getFoliageInstances

Returns foliage instances within a bounding box, optionally filtered by type.

Parameters:

NameTypeRequiredDescription
box_minobjectYes{x, y, z} minimum corner
box_maxobjectYes{x, y, z} maximum corner
type_namestringNoFilter by foliage type name
mesh_pathstringNoFilter by mesh path

Returns: instances (array of {type_name, location, rotation, scale}), count (number)

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.getFoliageInstances", "params": { "box_min": { "x": -1000, "y": -1000, "z": -500 }, "box_max": { "x": 1000, "y": 1000, "z": 500 } } }

editor.landscape.removeFoliageInstances

Removes foliage instances within a bounding box, optionally filtered by type.

Parameters:

NameTypeRequiredDescription
box_minobjectYes{x, y, z} minimum corner
box_maxobjectYes{x, y, z} maximum corner
type_namestringNoFilter by foliage type name

Returns: success (bool), removed_count (number)

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.landscape.removeFoliageInstances", "params": { "box_min": { "x": -100, "y": -100, "z": -100 }, "box_max": { "x": 100, "y": 100, "z": 100 } } }