Documentation

Unity Engine

Download Unity

Unity Engine

TerrainRegion

An area of a Terrain that TerrainEditUtility edits or measures.
Read time 1 minuteLast updated 22 days ago

Definition

public sealed class TerrainRegion

Remarks

Positions are in meters on the X and Z axes of the Terrain's local space: (0, 0) is the corner at the Terrain's position and (TerrainData.size.x, TerrainData.size.z) is the opposite corner. Vector2.y and Rect.y hold the Z coordinate. A region can extend past the Terrain; only the part on the Terrain is used.

Static Properties

Property

Description

wholeThe whole Terrain.

Methods

Method

Description

ContainsChecks whether a position lies inside the region.
GetWeightGets how strongly an edit of this region applies at a position.

Static Methods

Method

Description

CircleCreates a disc-shaped region.
IntersectCreates the region where two regions overlap.
PathCreates a corridor of a given width along a polyline, such as a road or a river.
RectangleCreates a rectangular region.