用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:terrain:terrain

Terrain 地形

class in UnityEngine/Inherits from: Behaviour

Description 描述

The Terrain component renders the terrain.
地形组件渲染的地形。

Static Variables 静态变量

activeTerrainThe active terrain. This is a convenience function to get to the main terrain in the scene.
激活地形,这是个便于获取场景中主要地形的函数。
activeTerrainsThe active terrains in the scene.
在场景中激活地形。

Variables 变量

bakeLightProbesForTreesSpecifies if an array of internal light probes should be baked for terrain trees. Available only in editor.
指定的数组内部的灯光探测器应该烘培地形树。仅在编辑中可获取。
basemapDistanceHeightmap patches beyond basemap distance will use a precomputed low res basemap.
高度图面片超出底图距离将使用一个预先计算的低解析度底图。
castShadowsShould terrain cast shadows?.
地面是否产生阴影?
collectDetailPatchesCollect Detail patches from memory.
从内存中回收细节块。
detailObjectDensityDensity of detail objects.
细节物体的密度。
detailObjectDistanceDetail objects will be displayed up to this distance.
细节物体将被显示到这个距离。
drawHeightmapSpecify if terrain heightmap should be drawn.
绘制制定地形高度图
drawTreesAndFoliageSpecify if terrain trees and details should be drawn.
绘制指定的地形树和细节。
heightmapMaximumLODLets you essentially lower the heightmap resolution used for rendering.
实际上用于让你降低渲染高度图的解析度。
heightmapPixelErrorAn approximation of how many pixels the terrain will pop in the worst case when switching lod.
在切换lod时,地形将出现大约有多少像素的容差。
legacyShininessThe shininess value of the terrain.
地形的光泽度。
legacySpecularThe specular color of the terrain.
地形的高光颜色。
lightmapIndexThe index of the baked lightmap applied to this terrain.
应用到该渲染器的光照图的索引。
lightmapScaleOffsetThe UV scale & offset used for a baked lightmap.
用来烘培的光照图的UV缩放和偏移量。
materialTemplateThe custom material used to render the terrain.
用于渲染地形的自定义的材质。
materialTypeThe type of the material used to render the terrain. Could be one of the built-in types or custom. See MaterialType.
用于渲染地形的材质的类型。可能是内置或自定义类型之一。
realtimeLightmapIndexThe index of the realtime lightmap applied to this terrain.
应用于地形的实时光照图的索引。
realtimeLightmapScaleOffsetThe UV scale & offset used for a realtime lightmap.
实时光照图的UV缩放和偏移。
reflectionProbeUsageHow reflection probes are used for terrain. See ReflectionProbeUsage.
用于地形的反射探测器。
terrainDataThe Terrain Data that stores heightmaps, terrain textures, detail meshes and trees.
地形数据存储了高度图,地形的纹理,细节网格和树。
treeBillboardDistanceDistance from the camera where trees will be rendered as billboards only.
树到摄像机的距离大于这个特定值将会仅以广告板模式渲染。
treeCrossFadeLengthTotal distance delta that trees will use to transition from billboard orientation to mesh orientation.
树木从广告板到网格方向的变换的距离。
treeDistanceThe maximum distance at which trees are rendered.
渲染树的最大距离。
treeMaximumFullLODCountMaximum number of trees rendered at full LOD.
渲染全部LOD数目的最大数量。

Public Functions 公共函数

AddTreeInstanceAdds a tree instance to the terrain.
在地形场景中添加树实例。
ApplyDelayedHeightmapModificationUpdate the terrain's LOD and vegetation information after making changes with TerrainData.SetHeightsDelayLOD.
在改变场景后,用TerrainData.SetHeightsDelayLOD更新地形场景的LOD和植物信息。
FlushFlushes any change done in the terrain so it takes effect.
当它生效时清除地形场景中的任何改变。
GetClosestReflectionProbesFills 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.
将与地形边界相交的反射探测器填充到该列表。他们的权重也会被提供。权重表示对地形上的探测器产生多少影响,当混合多个反射探测器发生混合时权重被使用。
GetPositionGet the position of the terrain.
获取地形的位置。
SampleHeightSamples the height at the given position defined in world space, relative to the terrain space.
在世界坐标中,相对于地形空间,采样给定位置的高度
SetNeighborsLets you setup the connection between neighboring Terrains.
允许你在相邻的地形上设定连接。

Static Functions 静态函数

CreateTerrainGameObjectCreates a Terrain including collider from TerrainData.
创建包含碰撞器的地形。
script/unityengine/classes/terrain/terrain.txt · 最后更改: 2016/08/02 05:35 (外部编辑)