The TerrainData class stores heightmaps, detail mesh positions, tree instances, and terrain texture alpha maps.
The Terrain component links to the terrain data and renders it.
alphamapHeight | Height of the alpha map. |
alphamapLayers | Number of alpha map layers. |
alphamapResolution | Resolution of the alpha map. |
alphamapTextures | Alpha map textures used by the Terrain. Used by Terrain Inspector for undo. |
alphamapWidth | Width of the alpha map. |
baseMapResolution | Resolution of the base map used for rendering far patches on the terrain. |
detailHeight | Detail height of the TerrainData. |
detailPrototypes | Contains the detail texture/meshes that the terrain has. |
detailResolution | Detail Resolution of the TerrainData. |
detailWidth | Detail width of the TerrainData. |
heightmapHeight | Height of the terrain in samples (Read Only). |
heightmapResolution | Resolution of the heightmap. |
heightmapScale | The size of each heightmap sample. |
heightmapWidth | Width of the terrain in samples (Read Only). |
size | The total size in world units of the terrain. |
splatPrototypes | Splat texture used by the terrain. |
thickness | The thickness of the terrain used for collision detection. |
treeInstanceCount | Returns the number of tree instances. |
treeInstances | Contains the current trees placed in the terrain. |
treePrototypes | The list of tree prototypes this are the ones available in the inspector. |
wavingGrassAmount | Amount of waving grass in the terrain. |
wavingGrassSpeed | Speed of the waving grass. |
wavingGrassStrength | Strength of the waving grass in the terrain. |
wavingGrassTint | Color of the waving grass that the terrain has. |
GetAlphamaps | Returns the alpha map at a position x, y given a width and height. |
GetDetailLayer | Returns a 2D array of the detail object density in the specific location. |
GetHeight | Obtiene la altitud en el punto x, y indicado. |
GetHeights | Get an array of heightmap samples. |
GetInterpolatedHeight | Gets an interpolated height at a point x,y. |
GetInterpolatedNormal | Get an interpolated normal at a given location. |
GetSteepness | Obtiene la altitud en el punto x, y indicado. |
GetSupportedLayers | Returns an array of all supported detail layer indices in the area. |
GetTreeInstance | 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. |
RefreshPrototypes | Reloads all the values of the available prototypes (ie, detail mesh assets) in the TerrainData Object. |
SetAlphamaps | Assign all splat values in the given map area. |
SetDetailLayer | Sets the detail layer density map. |
SetDetailResolution | Set the resolution of the detail map. |
SetHeights | Set an array of heightmap samples. |
SetHeightsDelayLOD | Set an array of heightmap samples. |
SetTreeInstance | 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. |
hideFlags | Should the object be hidden, saved with the scene or modifiable by the user? |
name | El nombre del objeto. |
GetInstanceID | Returns the instance id of the object. |
ToString | Devuelve el nombre del objeto. |
Destroy | Elimina un gameobject, componente o asset. |
DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
DontDestroyOnLoad | Makes the object target not be destroyed automatically when loading a new scene. |
FindObjectOfType | Devuelve el primer objeto activo cargado de tipo type. |
FindObjectsOfType | Devuelve una lista de todos los objetos activos cargados de tipo type. |
Instantiate | Devuelve el nombre del objeto. |
bool | ¿Existe el objeto? |
operator != | Compares if two objects refer to a different object. |
operator == | Compares two object references to see if they refer to the same object. |