UnityEngine.TerrainModule Describes the transform of a Terrain detail object. The X coordinate of the detail object in the Terrain's local space. To get the X in world space, add this value to position X of the Terrain. The Y coordinate of the detail object in the Terrain's local space. To get the Y in world space, add this value to position Y of the Terrain. The Z coordinate of the detail object in the Terrain's local space. To get the Z in world space, add this value to position Z of the Terrain. The angle, in radians, at which the detail object rotates around the Y-axis. The X and Z scale values of the detail object. These two values are always the same. The Y scale value of the detail object. Detail prototype used by the Terrain GameObject. Bend factor of the detailPrototype. Color when the DetailPrototypes are "dry". Color when the DetailPrototypes are "healthy". Controls how far away detail objects are from the edge of the hole area. Maximum height of the grass billboards (if render mode is GrassBillboard). Maximum width of the grass billboards (if render mode is GrassBillboard). Minimum height of the grass billboards (if render mode is GrassBillboard). Minimum width of the grass billboards (if render mode is GrassBillboard). Specifies the random seed value for detail object placement. Controls the spatial frequency of the noise pattern used to vary the scale and color of the detail objects. GameObject used by the DetailPrototype. Texture used by the DetailPrototype. Render mode for the DetailPrototype. Indicates whether this detail prototype uses for rendering. Indicates whether this detail prototype uses the Mesh object from the GameObject specified by prototype. Returns true if the detail prototype is valid and the Terrain can accept it. Returns a message that indicates the cause of failed validation. Returns true if the detail prototype is valid and the Terrain can accept it. Returns a message that indicates the cause of failed validation. Render mode for detail prototypes. The detail prototype will use the grass shader. The detail prototype will be rendered as billboards that are always facing the camera. Will show the prototype using diffuse shading. Structure containing minimum and maximum terrain patch height values. Maximum height of a terrain patch. Minimum height of a terrain patch. A Splat prototype is just a texture that is used by the TerrainData. The metallic value of the splat layer. Normal map of the splat applied to the Terrain. The smoothness value of the splat layer when the main texture has no alpha channel. Texture of the splat applied to the Terrain. Offset of the tile texture of the SplatPrototype. Size of the tile used in the texture of the SplatPrototype. The Terrain component renders the terrain. The active Terrain. This is a convenient function to get to the main Terrain in the Scene. The active terrains in the Scene. Specifies if the terrain tile will be automatically connected to adjacent tiles. Specifies if an array of internal light probes should be baked for terrain trees. Available only in editor. Heightmap patches beyond basemap distance will use a precomputed low res basemap. Terrain bottom neighbor. Should terrain cast shadows?. Collect detail patches from memory. Graphics format of the Terrain holes Texture when it is compressed. Texture format of the Terrain holes Texture when it is compressed. Removes ringing from probes on trees if enabled. Density of detail objects. Detail objects will be displayed up to this distance. Indicates whether Unity draws the Terrain geometry itself. Set to true to enable the terrain instance renderer. The default value is false. Specify if terrain trees and details should be drawn. Controls what part of the terrain should be rendered. Grouping ID for auto connect. Graphics format of the Terrain heightmap. Lets you essentially lower the heightmap resolution used for rendering. An approximation of how many pixels the terrain will pop in the worst case when switching lod. RenderTextureFormat of the terrain heightmap. Graphics format of the Terrain holes Texture when it is not compressed. Render texture format of the Terrain holes Texture. Defines whether Unity frees per-Camera rendering resources for the Terrain when those resources aren't in use after a certain number of frames. The Terrain tile to the left, which is in the negative X direction. The shininess value of the terrain. The specular color of the terrain. The index of the baked lightmap applied to this terrain. The UV scale & offset used for a baked lightmap. The custom material Unity uses to render the Terrain. The type of the material used to render the terrain. Could be one of the built-in types or custom. See Terrain.MaterialType. Graphics format of the Terrain normal map texture. Render texture format of the Terrain normal map texture. Returns the normal map texture computed from sampling the heightmap. It is only used when terrain is rendered using instancing. Texture format of the Terrain normal map texture. Set the terrain bounding box scale. Allows you to specify how Unity chooses the for tree instances. The index of the realtime lightmap applied to this terrain. The UV scale & offset used for a realtime lightmap. How reflection probes are used for terrain. See Rendering.ReflectionProbeUsage. Determines which rendering layers the Terrain renderer lives on. The Terrain tile to the left, which is in the positive X direction. Allows you to set the shadow casting mode for the terrain. The Terrain Data that stores heightmaps, terrain textures, detail meshes and trees. Terrain top neighbor. Distance from the camera where trees will be rendered as billboards only. Total distance delta that trees will use to transition from billboard orientation to mesh orientation. The maximum distance at which trees are rendered. The multiplier to the current LOD bias used for rendering LOD trees (i.e. SpeedTree trees). Maximum number of trees rendered at full LOD. Adds a tree instance to the terrain. Update the terrain's LOD and vegetation information after making changes with TerrainData.SetHeightsDelayLOD. Creates a Terrain including collider from TerrainData. Flushes any change done in the terrain so it takes effect. Populates a List of Terrains with the active Terrains in the Scene. A List of Terrains this function populates with the active Terrains in the Scene. Fills the list with reflection probes whose AABB intersects with terrain's AABB. Their weights are also provided. Weight shows how much influence the probe has on the terrain, and is used when the blending between multiple reflection probes occurs. [in / out] A list to hold the returned reflection probes and their weights. See ReflectionProbeBlendInfo. The InstanceID of the camera being queried. See Object.GetInstanceID. Returns true if all rendering resources for the given camera are saved regardless of usage. Returns false if garbage collection is allowed to free unused resources. Get the position of the terrain. Get the previously set splat material properties by copying to the dest MaterialPropertyBlock object. The type of the material used to render a terrain object. Could be one of the built-in types or custom. A built-in material that uses the legacy Lambert (diffuse) lighting model and has optional normal map support. A built-in material that uses the legacy BlinnPhong (specular) lighting model and has optional normal map support. A built-in material that uses the standard physically-based lighting model. Inputs supported: smoothness, metallic / specular, normal. Use a custom material given by Terrain.materialTemplate. Samples the height at the given position defined in world space, relative to the Terrain space. Marks the current connectivity status as invalid. Defines whether Unity cleans up rendering resources for a given Camera during garbage collection. The InstanceID of the camera for which freeUnusedRenderingResources is being set. See Object.GetInstanceID. The value to set to this camera's freeUnusedRenderingResources flag. Lets you set up the connection between neighboring Terrain tiles. This ensures LOD matches up on neighboring Terrain tiles. The Terrain tile to the left is in the negative X direction. The Terrain tile to the top is in the positive Z direction. The Terrain tile to the right is in the positive X direction. The Terrain tile to the bottom is in the negative Z direction. Set the additional material properties when rendering the terrain heightmap using the splat material. This static class provides events that Unity triggers when Terrain data changes. This event is triggered after there are changes to Terrain height data. This event is triggered after there are changes to Terrain textures. Use this delegate type with heightmapChanged to monitor all changes to the Terrain heightmap. The Terrain object that references a changed TerrainData asset. The heightmap region that changed, in samples. Indicates whether the changes were fully synchronized back to CPU memory. Use this delegate type with textureChanged to monitor all the changes to Terrain textures. The Terrain object that references a changed TerrainData asset. The name of the texture that changed. The region of the Terrain texture that changed, in texel coordinates. Indicates whether the changes were fully synchronized back to CPU memory. Indicate the types of changes to the terrain in OnTerrainChanged callback. Indicates a change to the heightmap data without computing LOD. Indicates a change to the Terrain holes data, which doesn't include LOD calculations and tree/vegetation updates. Indicates that a change was made to the terrain that was so significant that the internal rendering data need to be flushed and recreated. Indicates a change to the heightmap data. Indicates a change to the heightmap resolution. Indicates a change to the Terrain holes data. Indicates a change to the detail data. Indicates a change to the tree data. Indicates that the TerrainData object is about to be destroyed. The TerrainData class stores heightmaps, detail mesh positions, tree instances, and terrain texture alpha maps. Height of the alpha map. (Read only.) Number of alpha map layers. The size of the alpha map in texels for either the width or the height. Returns the number of alphamap textures. Alpha map textures used by the Terrain. Used by Terrain Inspector for undo. Width of the alpha map. Resolution of the base map used for rendering far patches on the terrain. The local bounding box of the TerrainData object. The resolution of the detail data stored in TerrainData. The number of patches along a terrain tile edge. This is squared to make a grid of patches. Contains the detail texture/meshes that the Terrain has. Detail Resolution of the TerrainData. Detail Resolution of each patch. A larger value will decrease the number of batches used by detail objects. The resolution of the detail data stored in TerrainData. Enable the Terrain holes Texture compression. Height of the terrain in samples (Read Only). The size of the heightmap in texels for either the width or the height. Returns a Vector3 where the x and z components are the size of each heightmap sample (i.e. the space between two neighboring heightmap samples), and the y component is the entire Terrain's height range in world space. Returns the heightmap texture. Width of the terrain in samples (Read Only). Returns the Terrain holes resolution for both the data and the Texture. Returns the Terrain holes Texture. The total size in world units of the terrain. Splat texture used by the terrain. Retrieves the terrain layers used by the current terrain. The thickness of the terrain used for collision detection. Returns the number of tree instances. Contains the current trees placed in the terrain. The list of tree prototypes available in the inspector. Amount of waving grass in the terrain. Speed of the waving grass. Strength of the waving grass in the terrain. Color of the waving grass that the terrain has. The name for the Terrain alpha map textures. This function computes and returns an array of detail object transforms for the specified patch and the specified prototype. You can use this function to retrieve the exact same transform data the Unity engine uses for detail rendering. The x index of the patch. The y index of the patch. The prototype index. The density setting of the detail. Returns the bounds of the detail objects. Copies the specified part of the active RenderTexture to the Terrain heightmap texture. The part of the active Render Texture to copy. The X and Y coordinates of the heightmap texture to copy into. Controls how CPU synchronization is performed. Copies the specified part of the active RenderTexture to the Terrain texture. The name of the Terrain texture to copy into. The index of the Terrain texture to copy into. The part of the active Render Texture to copy. The X and Y coordinates of the Terrain texture to copy into. Specifies whether to allow delayed CPU synchronization of the texture. Marks the specified part of the heightmap as dirty. The rectangular region to mark as dirty. Controls how CPU synchronization is performed. Marks the specified part of the Terrain texture as dirty. The name of the Terrain texture. The rectangular region to mark as dirty. Specifies whether to allow delayed CPU synchronization of the texture. Returns the alpha map at a position x, y given a width and height. The x offset to read from. The y offset to read from. The width of the alpha map area to read. The height of the alpha map area to read. A 3D array of floats, where the 3rd dimension represents the mixing weight of each splatmap at each x,y coordinate. Returns the alphamap texture at the specified index. Index of the alphamap. Alphamap texture at the specified index. Returns an array of detail patches, which are each identified by X-Z coordinates. Detail objects in the patches are clamped to the maximum count. The detail density value. See Terrain.detailObjectDensity. Returns a 2D array of the detail object density (i.e. the number of detail objects for this layer) in the specific location. First x index of detail object density data to retrieve. First y index of detail object density data to retrieve. The amount of detail object density data to retrieve along the Terrain's x axis. The amount of detail object density data to retrieve along the Terrain's z axis. The index of the detail in the TerrainData.detailPrototypes array. Gets the world space height of the Terrain at a certain point x,y without adding the Terrain's world position y. Gets an array of heightmap samples. First index of heightmap samples to retrieve along the Terrain's x axis. First index of heightmap samples to retrieve along the Terrain's z axis. Number of samples to retrieve along the Terrain's x axis. Number of samples to retrieve along the Terrain's z axis. Gets an array of Terrain holes samples. First x index of Terrain holes samples to retrieve. First y index of Terrain holes samples to retrieve. Number of samples to retrieve along the Terrain holes x axis. Number of samples to retrieve along the Terrain holes y axis. Gets an interpolated height at a point x,y. The x and y coordinates are clamped to [0, 1]. X coordinate of the point in the range of [0, 1]. Y coordinate of the point in the range of [0, 1]. Gets an array of terrain height values using the normalized x,y coordinates. The base x coordinate. The base y coordinate. The number of queries along the X axis. The number of queries along the Y axis. The interval between each query along the X axis. The interval between each query along the Y axis. Fills the array with Terrain height values using normalized x,y coordinates. The array to fill with height values. The offset from the beginning of the array, along the X axis, at which to start filling in height values. The offset from the beginning of the array, along the Y axis, at which to start filling in height values. The base x coordinate. The base y coordinate. The number of queries along the X axis. The number of queries along the Y axis. The interval between each query along the X axis. The interval between each query along the Y axis. Get an interpolated normal at a given location. Returns an array of tesselation maximum height error values per renderable terrain patch. The returned array can be modified and passed to OverrideMaximumHeightError. Float array of maximum height error values. Returns an array of min max height values for all the renderable patches in a terrain. The returned array can be modified and then passed to OverrideMinMaxPatchHeights. Minimum and maximum height values for each patch. Gets the gradient of the terrain at point (x,y). Returns an array of all supported detail layer indices in the area. Gets the tree instance at the specified index. It is used as a faster version of treeInstances[index] as this function doesn't create the entire tree instances array. The index of the tree instance. The name for the Terrain holes Texture. Gets whether a certain point at x,y is a hole. Override the maximum tessellation height error with user provided values. Note that the overriden values get reset when the terrain resolution is changed and stays unchanged when the terrain heightmap is painted or changed via script. Provided maximum height error values. Override the minimum and maximum patch heights for every renderable terrain patch. Note that the overriden values get reset when the terrain resolution is changed and stays unchanged when the terrain heightmap is painted or changed via script. Array of minimum and maximum terrain patch height values. Reloads all the values of the available prototypes (ie, detail mesh assets) in the TerrainData Object. Assign all splat values in the given map area. Marks the terrain data as dirty to trigger an update of the terrain basemap texture. Sets the detail layer density map. Sets the resolution of the detail map. Specifies the number of pixels in the detail resolution map. A larger detailResolution, leads to more accurate detail object painting. Specifies the size in pixels of each individually rendered detail patch. A larger number reduces draw calls, but might increase triangle count since detail patches are culled on a per batch basis. A recommended value is 16. If you use a very large detail object distance and your grass is very sparse, it makes sense to increase the value. Sets an array of heightmap samples. First x index of heightmap samples to set. First y index of heightmap samples to set. Array of heightmap samples to set (values range from 0 to 1, array indexed as [y,x]). Sets an array of heightmap samples. First x index of heightmap samples to set. First y index of heightmap samples to set. Array of heightmap samples to set (values range from 0 to 1, array indexed as [y,x]). Sets an array of Terrain holes samples. First x index of Terrain holes samples to set. First y index of Terrain holes samples to set. Array of Terrain holes samples to set (array indexed as [y,x]). Sets an array of Terrain holes samples. First x index of Terrain holes samples to set. First y index of Terrain holes samples to set. Array of Terrain holes samples to set (array indexed as [y,x]). This function sets the terrainLayers property, and in addition, registers the action to the Editor's undo stack. The Terrain Layer assets to set. The name of the Editor's undo action. Sets the tree instance with new parameters at the specified index. However, you cannot change TreeInstance.prototypeIndex and TreeInstance.position. If you change them, the method throws an ArgumentException. The index of the tree instance. The new TreeInstance value. Sets the Tree Instance array, and optionally snaps Trees onto the surface of the Terrain heightmap. The array of TreeInstance objects. Specifies whether to snap Trees to the Terrain heightmap. Performs synchronization queued by previous calls to CopyActiveRenderTextureToHeightmap and DirtyHeightmapRegion, which makes the height data and LOD data used for tessellation up to date. Performs synchronization queued by previous calls to CopyActiveRenderTextureToTexture and DirtyTextureRegion, which makes CPU data of the Terrain textures up to date. The name of the Terrain texture to synchronize. Triggers an update to integrate modifications done to the heightmap outside of unity. Start X position of the dirty heightmap region. Start Y position of the dirty heightmap region. Width of the dirty heightmap region. Width of the dirty heightmap region. Update immediately, instead of deferring the update. Extension methods to the Terrain class, used only for the UpdateGIMaterials method used by the Global Illumination System. Schedules an update of the albedo and emissive Textures of a system that contains the Terrain. Schedules an update of the albedo and emissive Textures of a system that contains the Terrain. Controls what Terrain heightmap data to synchronize when there are changes to the heightmap texture. Synchronizes height data of the heightmap texture from the GPU back to CPU memory. Then computes LOD data, used for determining the tessellation level, from the height data. Synchronizes only height data of the heightmap texture from the GPU back to CPU memory. Does not synchronize the height data nor the LOD data. Description of a terrain layer. A Vector4 value specifying the maximum RGBA value that the diffuse texture maps to when the value of the channel is 1. A Vector4 value specifying the minimum RGBA value that the diffuse texture maps to when the value of the channel is 0. The diffuse texture used by the terrain layer. A Vector4 value specifying the maximum RGBA value that the mask map texture maps to when the value of the channel is 1. A Vector4 value specifying the minimum RGBA value that the mask map texture maps to when the value of the channel is 0. The mask map texture used by the terrain layer. Metallic factor used by the terrain layer. Normal map texture used by the terrain layer. A float value that scales the normal vector. The minimum value is 0, the maximum value is 1. Smoothness of the specular reflection. Specular color. UV tiling offset. UV Tiling size. Enum provding terrain rendering options. Render all options. Render terrain details. Render heightmap. Render trees. Represents a linear 2D transformation between brush UV space and a target XY space (typically this is a Terrain-local object space.) (Read Only) Brush UV origin, in XY space. (Read Only) Brush U vector, in XY space. (Read Only) Brush V vector, in XY space. (Read Only) Target XY origin, in Brush UV space. (Read Only) Target X vector, in Brush UV space. (Read Only) Target Y vector, in Brush UV space. Creates a BrushTransform. Origin of the brush, in target XY space. Brush U vector, in target XY space. Brush V vector, in target XY space. Applies the transform to convert a Brush UV coordinate to the target XY space. Brush UV coordinate to transform. Target XY coordinate. Creates an axis-aligned BrushTransform from a rectangle. Brush rectangle, in target XY coordinates. BrushTransform describing the brush. Get the axis-aligned bounding rectangle of the brush, in target XY space. Bounding rectangle in target XY space. Applies the transform to convert a target XY coordinate to Brush UV space. Point in target XY space. Point transformed to Brush UV space. The context for a paint operation that may span multiple connected Terrain tiles. (Read Only) RenderTexture that an edit operation writes to modify the data. The minimum height of all Terrain tiles that this PaintContext touches in world space. The height range (from Min to Max) of all Terrain tiles that this PaintContext touches in world space. Unity uses this value internally to transform a [0, 1] height value to a texel value, which is stored in TerrainData.heightmapTexture. (Read Only) The value of RenderTexture.active at the time CreateRenderTargets is called. (Read Only) The Terrain used to build the PaintContext. (Read Only) The pixel rectangle that this PaintContext represents. (Read Only) The size of a PaintContext pixel in terrain units (as defined by originTerrain.) (Read Only) Render target that stores the original data from the Terrain tiles. (Read Only) The height of the target terrain texture. This is the resolution for a single Terrain. (Read Only) The width of the target terrain texture. This is the resolution for a single Terrain. (Read Only) The number of Terrain tiles in this PaintContext. Flushes the delayed actions created by PaintContext heightmap and alphamap modifications. Releases the allocated resources of this PaintContext. When true, indicates that this function restores RenderTexture.active Constructs a PaintContext that you can use to edit a texture on a Terrain, in the region defined by boundsInTerrainSpace and extraBorderPixels. Terrain that defines terrain space for this PaintContext. Terrain space bounds to edit in the target terrain texture. Width of the input Terrain Texture for all connected Terrains. Height of the input Terrain Texture for all connected Terrains. Number of extra border pixels required. The default value is 0. Whether to stretch the Textures so that edge texels lie on the Terrain boundary, and are shared with connected Terrains. Whether to fill empty space outside of the Terrain tiles with data from the nearest tile. Creates the sourceRenderTexture and destinationRenderTexture. Render Texture format. Creates a new PaintContext, to edit a target texture on a Terrain, in a region defined by pixelRect. Terrain that defines terrain space for this PaintContext. Pixel rectangle to edit in the target terrain texture. Width of the target terrain texture (per Terrain). Height of the target terrain texture (per Terrain). Whether to stretch the Textures so that edge texels lie on the Terrain boundary, and are shared with connected Terrains. Whether to fill empty space outside of the Terrain tiles with data from the nearest tile. Gathers user-specified Texture data into sourceRenderTexture. A function that returns the Texture data to collect from each Terrain. The default color for sourceRenderTexture. The material used to copy the data. If null, the default blit material is used. The material pass used to copy the data. An optional action to call before copying from each Terrain. The default is null. An optional action to call after copying from each Terrain. The default is null. Gathers the alphamap information into sourceRenderTexture. TerrainLayer used for painting. Set to true to specify that the inputLayer is added to the terrain if it does not already exist. Set to false to specify that terrain layers are not added to the terrain. Gathers the heightmap information into sourceRenderTexture. Gathers the Terrain holes information into sourceRenderTexture. Gathers the normal information into sourceRenderTexture. Retrieves the clipped pixel rectangle for a Terrain, relative to the PaintContext render textures. Index of the Terrain. Returns the clipped pixel rectangle. Retrieves the clipped pixel rectangle for a Terrain. Index of the Terrain. Returns the clipped pixel rectangle. Retrieves a Terrain from the PaintContext. Index of the terrain. Returns the Terrain object. Interface that conveys information about a Terrain within the PaintContext area. PaintContext.pixelRect, clipped to this Terrain, in PaintContext pixel coordinates. (Read Only) PaintContext.pixelRect, clipped to this Terrain, in Terrain pixel coordinates. (Read Only) Controls gathering from this Terrain within the PaintContext. The default is true. Use this property to fill empty regions in PaintContext. It is the same as clippedPCPixels with padding around unconnected Terrain edges. (Read Only) Use this property to fill empty regions in PaintContext. It is the same as clippedTerrainPixels with padding around unconnected Terrain edges. (Read Only) Controls scattering to this Terrain within the PaintContext. The default is true. The Terrain represented by this context. (Read Only) Modify this value, if required, to store and retrieve values relevant to the PaintContext operation. Applies an edited PaintContext by copying modifications back to user-specified RenderTextures for the source Terrain tiles. Function returning the RenderTexture to be written for each Terrain. The material used to copy the data. If null, the default blit material is used. The material pass used to copy the data. Its default value is 0. An optional action to call before copying to each Terrain. An optional action to call after copying to each Terrain. Applies an edited alphamap PaintContext by copying modifications back to the source Terrain tiles. Unique name used for the undo stack. Applies an edited heightmap PaintContext by copying modifications back to the source Terrain tiles. Unique name used for the undo stack. Applies an edited Terrain holes PaintContext by copying modifications back to the source Terrain tiles. Unique name used for the undo stack. Built-in render passes for paint material. Built-in render pass for painting Terrain holes. Built-in render pass for painting the splatmap texture. Built-in render pass for raising and lowering Terrain height. Built-in render pass for setting Terrain height. Built-in render pass for smoothing the Terrain height. Built-in render pass for stamping heights on the Terrain. A set of utility functions for custom terrain paint tools. Helper function to set up a PaintContext for modifying the heightmap of one or more Terrain tiles. Reference Terrain tile. The region in terrain space to edit. Number of extra border pixels required. Whether to fill empty space outside of Terrain tiles with data from the nearest tile. PaintContext containing the combined heightmap data for the specified region. Helper function to set up a PaintContext for modifying the Terrain holes of one or more Terrain tiles. Reference Terrain tile. The region in Terrain space to edit. Number of extra border pixels required. Whether to fill empty space outside of Terrain tiles with data from the nearest tile. PaintContext that contains the combined Terrain holes data for the specified region. Helper function to set up a PaintContext for modifying the alphamap of one or more Terrain tiles. Reference Terrain tile. Selects the alphamap to paint. The region in terrain space to edit. Number of extra border pixels required. Whether to fill empty space outside of Terrain tiles with data from the nearest tile. PaintContext containing the combined alphamap data for the specified region. Builds a Scale & Offset transform to convert between one PaintContext's UV space and another PaintContext's UV space. Source PaintContext. Destination PaintContext. ScaleOffset transform. Creates a BrushTransform from the input parameters. Reference terrain, defines terrain UV and object space. Center point of the brush, in terrain UV space (0-1 across the terrain tile). Size of the brush, in terrain space. Brush rotation in degrees (clockwise). Transform from terrain space to Brush UVs. Helper function to set up a PaintContext that collects mesh normal data from one or more Terrain tiles. Reference Terrain tile. The region in terrain space from which to collect normals. Number of extra border pixels required. Whether to fill empty space outside of Terrain tiles with data from the nearest tile. PaintContext containing the combined normalmap data for the specified region. Helper function to complete a heightmap modification. The heightmap paint context to complete. Unique name used for the undo stack. Helper function to complete a Terrain holes modification. The Terrain holes PaintContext to complete. Unique name used for the undo stack. Helper function to complete a texture alphamap modification. The texture paint context to complete. Unique name used for the undo stack. Finds the index of a TerrainLayer in a Terrain tile. Terrain tile. Terrain layer to search for. Returns the index of the terrain layer if it exists or -1 if it doesn't exist. Returns the default material for blitting operations. Built in "Hidden/BlitCopy" material. Calculates the minimum and maximum Brush size limits, in world space. Returns the minimum Brush size, in world space units. Returns the maximum Brush size, in world space units. The size of a Terrain tile, in world space units. The resolution of the Terrain tile texture the Brush edits, in pixels. The minimum Brush resolution, in pixels. Default is 1 pixel. The maximum Brush resolution, in pixels. Default is 8192 pixels. Returns the built-in in paint material used by the built-in tools. Built-in terrain paint material. Returns the default copy terrain layer material. Built in "HiddenTerrainTerrainLayerUtils" material. Returns the Material to use when copying the Terrain heightmap. Built in "HiddenTerrainEngineHeightBlitCopy" material. Returns the alphamap texture at mapIndex. Terrain tile. Index to retrieve. Alphamap texture at mapIndex. Releases the allocated resources of the specified PaintContext. The PaintContext containing the resources to release. Sets up all of the material properties used by functions in TerrainTool.cginc. PaintContext describing the area we are editing, and the terrain space. BrushTransform from terrain space to Brush UVs. Material to populate with transform properties. Type for mapping 2D (X,Z) tile coordinates to a Terrain object. Mapping from TileCoord to Terrain. Creates a TerrainMap from the neighbors connected to the origin Terrain. Terrain that is given tile coordinate (0,0). Filter to apply when populating the map. If null, no filter is applied. Validate the Terrain map. Default is true. The resulting Terrain map. Can return null when no Terrain objects pass the filter. Creates a TerrainMap from the positions of all active Terrains. Defines the grid origin and size, as well as group id if no filter is specified. Origin of the grid. Size of the grid. Typically takes the terrain size.x and size.z. Filter to be applied when populating the map. If null, the filter will fall back to matching terrains in the same group as the origin. Validate the Terrain map. Default is true. The resulting Terrain map. Can return null when no Terrain objects pass the filter. Creates a TerrainMap from the positions of all active Terrains. Defines the grid origin and size, as well as group id if no filter is specified. Origin of the grid. Size of the grid. Typically takes the terrain size.x and size.z. Filter to be applied when populating the map. If null, the filter will fall back to matching terrains in the same group as the origin. Validate the Terrain map. Default is true. The resulting Terrain map. Can return null when no Terrain objects pass the filter. Retrieves the Terrain object corresponding to the tile coordinates (tileX,tileZ). Tile X coordinate. Tile Z coordinate. Returns a valid Terrain object if successful, null otherwise. Specifies a set of 2D tile coordinates. Tile X coordinate. Tile Z coordinate. Provides a set of utility functions that are used by the terrain tools. Automatically connects neighboring terrains. Tree Component for the tree creator. Data asociated to the Tree. Tells if there is wind data exported from SpeedTree are saved on this component. Contains information about a tree placed in the Terrain game object. Color of this instance. Height scale of this instance (compared to the prototype's size). Lightmap color calculated for this instance. Position of the tree. Index of this instance in the TerrainData.treePrototypes array. Read-only. Rotation of the tree on X-Z plane (in radians). Width scale of this instance (compared to the prototype's size). Simple class that contains a pointer to a tree prototype. Bend factor of the tree prototype. The LOD index of a Tree LODGroup that Unity uses to generate a NavMesh. It uses this value only for Trees with a LODGroup, and ignores this value for regular Trees. Retrieves the actual GameObject used by the tree. The Terrain module implements Unity's Terrain rendering engine available through the Terrain component.