UnityEngine.TerrainModule Detail prototype used by the Terrain GameObject. Bend factor of the detailPrototype. Color when the DetailPrototypes are "dry". Color when the DetailPrototypes are "healthy". 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). How spread out is the noise for the DetailPrototype. GameObject used by the DetailPrototype. Texture used by the DetailPrototype. Render mode for the DetailPrototype. 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. 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 convenience function to get to the main terrain in the scene. The active terrains in the scene. Heightmap patches beyond basemap distance will use a precomputed low res basemap. Should terrain cast shadows?. Collect detail patches from memory. Density of detail objects. Detail objects will be displayed up to this distance. Specify if terrain heightmap should be drawn. Specify if terrain trees and details should be drawn. Controls what part of the terrain should be rendered. Whether some per-camera rendering resources for the terrain should be freed after not being used for some frames. 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. 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 used 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. Set the terrain bounding box scale. 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. The Terrain Data that stores heightmaps, terrain textures, detail meshes and trees. 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. 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. 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. Lets you setup the connection between neighboring Terrains. Set the additional material properties when rendering the terrain heightmap using the splat material. Indicate the types of changes to the terrain in OnTerrainChanged callback. Indicates a change to the heightmap data without computing LOD. 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 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. Number of alpha map layers. Resolution of the alpha map. 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. Detail height of the TerrainData. Contains the detail texture/meshes that the terrain has. Detail Resolution of the TerrainData. Detail width of the TerrainData. Height of the terrain in samples (Read Only). Resolution of the heightmap. The size of each heightmap sample. Width of the terrain in samples (Read Only). The total size in world units of the terrain. Splat texture used by the 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 this are the ones 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. 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 a 2D array of the detail object density in the specific location. Gets the height at a certain point x,y. Get an array of heightmap samples. First x index of heightmap samples to retrieve. First y index of heightmap samples to retrieve. Number of samples to retrieve along the heightmap's x axis. Number of samples to retrieve along the heightmap's y axis. Gets an interpolated height at a point x,y. Get an interpolated normal at a given location. Gets the gradient of the terrain at point (x,y). Returns an array of all supported detail layer indices in the area. Get 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. 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. Sets the detail layer density map. Set 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. Set 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]). Set 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]). Set the tree instance with new parameters at the specified index. However, TreeInstance.prototypeIndex and TreeInstance.position can not be changed otherwise an ArgumentException will be thrown. The index of the tree instance. The new TreeInstance value. 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. Enum provding terrain rendering options. Render all options. Render terrain details. Render heightmap. Render trees. 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. Retrieves the actual GameObect used by the tree.