pub struct DetailPrototype {Show 22 fields
pub dryColor: ColorRGBA,
pub healthyColor: ColorRGBA,
pub maxHeight: f32,
pub maxWidth: f32,
pub minHeight: f32,
pub minWidth: f32,
pub noiseSpread: f32,
pub prototype: PPtr,
pub prototypeTexture: PPtr,
pub renderMode: i32,
pub usePrototypeMesh: i32,
pub alignToGround: Option<f32>,
pub bendFactor: Option<f32>,
pub density: Option<f32>,
pub holeTestRadius: Option<f32>,
pub lightmapFactor: Option<f32>,
pub noiseSeed: Option<i32>,
pub positionJitter: Option<f32>,
pub positionOrderliness: Option<f32>,
pub targetCoverage: Option<f32>,
pub useDensityScaling: Option<i32>,
pub useInstancing: Option<i32>,
}
Expand description
DetailPrototype is a sub class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: Detail prototype used by the Terrain GameObject.
Fields§
§dryColor: ColorRGBA
Color when the DetailPrototypes are “dry”.
healthyColor: ColorRGBA
Color when the DetailPrototypes are “healthy”.
maxHeight: f32
Maximum height of the grass billboards (if render mode is GrassBillboard).
maxWidth: f32
Maximum width of the grass billboards (if render mode is GrassBillboard).
minHeight: f32
Minimum height of the grass billboards (if render mode is GrassBillboard).
minWidth: f32
Minimum width of the grass billboards (if render mode is GrassBillboard).
noiseSpread: f32
Controls the spatial frequency of the noise pattern used to vary the scale and color of the detail objects.
prototype: PPtr
GameObject used by the DetailPrototype.
PPtr<GameObject
>: (3.4.0 - 2022.3.2f1)
prototypeTexture: PPtr
Texture used by the DetailPrototype.
PPtr<Texture2D
>: (3.4.0 - 2022.3.2f1)
renderMode: i32
Render mode for the DetailPrototype.
usePrototypeMesh: i32
Indicates whether this detail prototype uses the Mesh object from the GameObject specified by prototype.
alignToGround: Option<f32>
Rotate detail axis parallel to the ground’s normal direction, so that the detail is perpendicular to the ground. f32: (2022.2.0b1 - 2022.3.2f1)
bendFactor: Option<f32>
f32: (3.4.0 - 2020.2.0a21)
density: Option<f32>
Controls detail density for this detail prototype, relative to it’s size. f32: (2022.2.0b1 - 2022.3.2f1)
holeTestRadius: Option<f32>
f32: (2020.2.0f1 - 2022.3.2f1)
lightmapFactor: Option<f32>
f32: (3.4.0 - 2021.1.28f1)
noiseSeed: Option<i32>
Specifies the random seed value for detail object placement. i32: (2021.2.0b1 - 2022.3.2f1)
positionJitter: Option<f32>
Controls how Unity generates the detail positions. f32: (2022.2.0b1 - 2022.3.2f1)
positionOrderliness: Option<f32>
f32: (2022.2.0a13 - 2022.2.0a13)
targetCoverage: Option<f32>
Controls the detail’s target coverage. f32: (2022.2.0b1 - 2022.3.2f1)
useDensityScaling: Option<i32>
Indicates the global density scale set in the terrain settings affects this detail prototype. i32: (2022.2.0b1 - 2022.3.2f1)
useInstancing: Option<i32>
Indicates whether this detail prototype uses GPU Instancing for rendering. i32: (2021.2.0b1 - 2022.3.2f1)