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. |
bounds | The local bounding box of the TerrainData object. |
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 | ¿Debería el objeto estar oculto, guardado con la escena o modificable por el usuario? |
name | El nombre del objeto. |
GetInstanceID | Devuelve el id de la instancia del objeto. |
ToString | Returns the name of the GameObject. |
Destroy | Elimina un gameobject, componente o asset. |
DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
DontDestroyOnLoad | Hace que el objeto target no sea destruido automáticamente cuando se cargue una nueva escena. |
FindObjectOfType | Devuelve el primer objeto activo cargado de tipo type. |
FindObjectsOfType | Devuelve una lista de todos los objetos activos cargados de tipo type. |
Instantiate | Clona el objeto original y devuelve el clon. |
bool | ¿Existe el objeto? |
operator != | Compare si dos objetos se refieren a un objeto diferente. |
operator == | Compara dos referencias de objeto para ver si se refieren al mismo objeto. |