pub struct LightComponent {Show 20 fields
pub light: ObjRef,
pub path: String,
pub world: Matrix,
pub kind: i64,
pub color: [f32; 4],
pub intensity: f32,
pub range: f32,
pub spot_angle: f32,
pub inner_spot_angle: f32,
pub shadows: i64,
pub color_temperature: Option<f32>,
pub bounce_intensity: f32,
pub light_unit: Option<i64>,
pub lux_at_distance: Option<f32>,
pub area_size: [f32; 2],
pub render_mode: i64,
pub baked: bool,
pub culling_mask: u32,
pub cookie: Option<ObjRef>,
pub off: Vec<OffFlag>,
}Expand description
A light as stored: Unity’s LightType (0 spot, 1 directional, 2 point, 3 rectangle, 4 disc), colour as stored (gamma-encoded), intensity, range, spot angles in degrees (full cone), shadow type, colour temperature (Kelvin, when used), bounce intensity, URP’s light unit and lux-at-distance, area size, render mode and culling mask.
Fields§
§light: ObjRefThe Light object.
path: StringIts GameObject’s path from the scene root, names joined by /.
world: MatrixIts GameObject’s world matrix.
kind: i64m_Type.
color: [f32; 4]m_Color, RGBA.
intensity: f32m_Intensity (1 when not stored).
range: f32m_Range (10 when not stored).
spot_angle: f32m_SpotAngle (30 when not stored).
inner_spot_angle: f32m_InnerSpotAngle (0 when not stored).
shadows: i64m_Shadows.m_Type (0 when not stored).
color_temperature: Option<f32>m_ColorTemperature, when m_UseColorTemperature is on.
bounce_intensity: f32m_BounceIntensity (1 when not stored).
light_unit: Option<i64>m_LightUnit, when stored.
lux_at_distance: Option<f32>m_LuxAtDistance, when stored.
area_size: [f32; 2]m_AreaSize (1 x 1 when not stored).
render_mode: i64m_RenderMode (0 when not stored).
baked: boolFully baked: m_BakingOutput says baked, as Baked (2), not mixed or realtime.
culling_mask: u32m_CullingMask’s bits (all layers when not stored).
m_Cookie.
off: Vec<OffFlag>What keeps it from shining; shines when empty.