pub struct TreeInstance {
pub color: ColorRGBA,
pub heightScale: f32,
pub index: i32,
pub lightmapColor: ColorRGBA,
pub position: Vector3f,
pub widthScale: f32,
pub rotation: Option<f32>,
}Expand description
TreeInstance is a sub class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: Contains information about a tree placed in the Terrain game object. This struct can be accessed from the TerrainData Object.
Fields§
§color: ColorRGBAColor of this instance.
heightScale: f32Height scale of this instance (compared to the prototype’s size).
index: i32§lightmapColor: ColorRGBALightmap color calculated for this instance.
position: Vector3fPosition of the tree.
widthScale: f32Width scale of this instance (compared to the prototype’s size).
rotation: Option<f32>Read-only.Rotation of the tree on X-Z plane (in radians). f32: (5.0.0f4 - 2022.3.2f1)
Trait Implementations§
Source§impl Debug for TreeInstance
impl Debug for TreeInstance
Source§impl<'de> Deserialize<'de> for TreeInstance
impl<'de> Deserialize<'de> for TreeInstance
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TreeInstance
impl RefUnwindSafe for TreeInstance
impl Send for TreeInstance
impl Sync for TreeInstance
impl Unpin for TreeInstance
impl UnwindSafe for TreeInstance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more