pub struct Terrain {Show 40 fields
pub m_BakeLightProbesForTrees: bool,
pub m_ChunkDynamicUVST: Vector4f,
pub m_DetailObjectDensity: f32,
pub m_DetailObjectDistance: f32,
pub m_DrawHeightmap: bool,
pub m_DrawTreesAndFoliage: bool,
pub m_DynamicUVST: Vector4f,
pub m_Enabled: u8,
pub m_GameObject: PPtr,
pub m_HeightmapMaximumLOD: i32,
pub m_HeightmapPixelError: f32,
pub m_LightmapIndex: u16,
pub m_LightmapIndexDynamic: u16,
pub m_LightmapTilingOffset: Vector4f,
pub m_LightmapTilingOffsetDynamic: Vector4f,
pub m_MaterialTemplate: PPtr,
pub m_ReflectionProbeUsage: i32,
pub m_SplatMapDistance: f32,
pub m_TerrainData: PPtr,
pub m_TreeBillboardDistance: f32,
pub m_TreeCrossFadeLength: f32,
pub m_TreeDistance: f32,
pub m_TreeMaximumFullLODCount: i32,
pub m_AllowAutoConnect: Option<bool>,
pub m_CastShadows: Option<bool>,
pub m_DefaultSmoothness: Option<f32>,
pub m_DrawInstanced: Option<bool>,
pub m_EnableHeightmapRayTracing: Option<bool>,
pub m_EnableTreesAndDetailsRayTracing: Option<bool>,
pub m_ExplicitProbeSetHash: Option<Hash128>,
pub m_GroupingID: Option<i32>,
pub m_IgnoreQualitySettings: Option<bool>,
pub m_LegacyShininess: Option<f32>,
pub m_LegacySpecular: Option<ColorRGBA>,
pub m_MaterialType: Option<i32>,
pub m_PreserveTreePrototypeLayers: Option<bool>,
pub m_RenderingLayerMask: Option<u32>,
pub m_ShadowCastingMode: Option<i32>,
pub m_StaticShadowCaster: Option<bool>,
pub m_UseDefaultSmoothness: Option<bool>,
}Expand description
Terrain is a class of the Unity engine since version 5.0.0f4. Exert from Unity’s scripting documentation: The Terrain component renders the terrain.
Fields§
§m_BakeLightProbesForTrees: boolSpecifies if an array of internal light probes should be baked for terrain trees. Available only in editor.
m_ChunkDynamicUVST: Vector4f§m_DetailObjectDensity: f32Density of detail objects.
m_DetailObjectDistance: f32Detail objects will be displayed up to this distance.
m_DrawHeightmap: boolIndicates whether Unity draws the Terrain geometry itself.
m_DrawTreesAndFoliage: boolSpecify if terrain trees and details should be drawn.
m_DynamicUVST: Vector4f§m_Enabled: u8Enabled Behaviours are Updated, disabled Behaviours are not.
m_GameObject: PPtrThe game object this component is attached to. A component is always attached to a game object.
PPtr<GameObject>: (5.0.0f4 - 2022.3.2f1)
m_HeightmapMaximumLOD: i32Lets you essentially lower the heightmap resolution used for rendering.
m_HeightmapPixelError: f32An approximation of how many pixels the terrain will pop in the worst case when switching lod.
m_LightmapIndex: u16The index of the baked lightmap applied to this terrain.
m_LightmapIndexDynamic: u16§m_LightmapTilingOffset: Vector4f§m_LightmapTilingOffsetDynamic: Vector4f§m_MaterialTemplate: PPtrThe custom material Unity uses to render the Terrain.
PPtr<Material>: (5.0.0f4 - 2022.3.2f1)
m_ReflectionProbeUsage: i32How reflection probes are used for terrain. See ReflectionProbeUsage.
m_SplatMapDistance: f32§m_TerrainData: PPtrThe Terrain Data that stores heightmaps, terrain textures, detail meshes and trees.
PPtr<TerrainData>: (5.0.0f4 - 2022.3.2f1)
m_TreeBillboardDistance: f32Distance from the camera where trees will be rendered as billboards only.
m_TreeCrossFadeLength: f32Total distance delta that trees will use to transition from billboard orientation to mesh orientation.
m_TreeDistance: f32The maximum distance at which trees are rendered.
m_TreeMaximumFullLODCount: i32Maximum number of trees rendered at full LOD.
m_AllowAutoConnect: Option<bool>Specifies if the terrain tile will be automatically connected to adjacent tiles. bool: (2018.3.0f2 - 2022.3.2f1)
m_CastShadows: Option<bool>bool: (5.0.0f4 - 2018.4.36f1)
m_DefaultSmoothness: Option<f32>f32: (5.0.0f4 - 5.0.0f4)
m_DrawInstanced: Option<bool>Set to true to enable the terrain instance renderer. The default value is false. bool: (2018.3.0f2 - 2022.3.2f1)
m_EnableHeightmapRayTracing: Option<bool>When this options is enabled, Terrain heightmap geometries will be added in acceleration structures used for Ray Tracing. bool: (2022.2.0b1 - 2022.3.2f1)
m_EnableTreesAndDetailsRayTracing: Option<bool>bool: (2022.2.0b1 - 2022.3.2f1)
m_ExplicitProbeSetHash: Option<Hash128>Hash128: (2017.2.0b2 - 2022.3.2f1)
m_GroupingID: Option<i32>Grouping ID for auto connect. i32: (2018.3.0f2 - 2022.3.2f1)
m_IgnoreQualitySettings: Option<bool>When enabled, the terrain ignores the terrain overrides set in the QualitySettings. bool: (2022.2.0b1 - 2022.3.2f1)
m_LegacyShininess: Option<f32>f32: (5.0.0f4 - 2019.2.0a7)
m_LegacySpecular: Option<ColorRGBA>ColorRGBA: (5.0.0f4 - 2019.2.0a7)
m_MaterialType: Option<i32>i32: (5.0.0f4 - 2019.2.0a7)
m_PreserveTreePrototypeLayers: Option<bool>Allows you to specify how Unity chooses the layer for tree instances. bool: (2018.2.0f2 - 2022.3.2f1)
m_RenderingLayerMask: Option<u32>Determines which rendering layers the Terrain renderer lives on. u32: (2019.3.0b1 - 2022.3.2f1)
m_ShadowCastingMode: Option<i32>Allows you to set the shadow casting mode for the terrain. i32: (2019.1.0b1 - 2022.3.2f1)
m_StaticShadowCaster: Option<bool>bool: (2021.1.0b1 - 2022.3.2f1)
m_UseDefaultSmoothness: Option<bool>bool: (5.0.0f4 - 5.0.0f4)