Documentation

Unity Engine

Download Unity

Unity Engine

TerrainSculptSettings

Settings for TerrainEditUtility.SculptHeights.
Read time 1 minuteLast updated 22 days ago

Definition

public sealed class TerrainSculptSettings

Remarks

Heights and distances are in meters. Heights are measured above the base of the Terrain, from 0 to TerrainData.size.y.

Constructors

Constructor

Description

TerrainSculptSettings(UnityEditor.TerrainTools.TerrainSculptOperation)Creates settings for an operation, with no falloff and no blend.

Properties

Property

Description

amountHow far to raise or lower for TerrainSculptOperation.Raise and TerrainSculptOperation.Lower. Must be greater than zero for those operations.
blendDistanceThe distance outside the region over which the change eases back to the untouched ground. Nothing farther than this from the region changes. Cannot be combined with TerrainSculptSettings.falloff, and must not exceed the diagonal of the Terrain.
falloffThe fraction of the region, from 0 to 1, over which the change fades at its edge. See TerrainRegion.GetWeight. Cannot be combined with TerrainSculptSettings.blendDistance.
flattenReferenceFor TerrainSculptOperation.Flatten: which height of the region to flatten to. The samples inside the region decide it, without the blend band and regardless of the falloff. TerrainFlattenReference.Mean by default.
heightThe target height for TerrainSculptOperation.Set. NaN by default. Raise, Lower and Smooth ignore it; Flatten requires it to be NaN, since it takes its height from the region.
operationHow to change the heights.
smoothRadiusThe averaging radius for TerrainSculptOperation.Smooth. 0 uses two heightmap cells. Must not exceed the diagonal of the Terrain.