Documentation

Unity Engine

Download Unity

Unity Engine

TerrainLayerPaintRule

One rule of TerrainEditUtility.PaintLayers: paint a layer where the height and the slope lie in their ranges.
Read time 1 minuteLast updated 22 days ago

Definition

public sealed class TerrainLayerPaintRule

Constructors

Constructor

Description

TerrainLayerPaintRule(System.Int32)Creates a rule that paints a layer everywhere in the region at full opacity.

Properties

Property

Description

heightRangePaint only where the height, in meters above the base of the Terrain, lies within [x, y]. Unbounded by default.
layerIndexThe index of the layer in TerrainData.terrainLayers.
opacityThe opacity, from 0 to 1. See TerrainLayerBlendMode. 1 by default.
slopeRangePaint only where the slope, in degrees, lies within [x, y]. [0, 90] by default.