Documentation

Unity Engine

Download Unity

Unity Engine

SculptHeights(TerrainData, TerrainRegion, TerrainSculptSettings)

Changes the heights of a Terrain inside a region.
Read time 1 minuteLast updated 23 days ago

Definition

public static TerrainEditResult SculptHeights(TerrainData terrainData, TerrainRegion region, TerrainSculptSettings settings)

Parameters

terrainData

The TerrainData to edit.

The region to change.

How to change the heights.

Returns

Type

Description

TerrainEditResultWhat changed.

Remarks

The change applies fully inside the region and either fades at its edge over TerrainSculptSettings.falloff, or eases back to the untouched ground over TerrainSculptSettings.blendDistance outside it. Heights are clamped to the range of the Terrain. Call this method on the main thread.