Struct DetailPrototype

Source
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)

Trait Implementations§

Source§

impl Debug for DetailPrototype

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DetailPrototype

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for DetailPrototype

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,