Optional initial property values. Omit to construct with defaults and set fields afterward.
Stable identity for this component, unique within a session. Auto-generated for runtime-created components; the editor overwrites it with a persistent id when projecting a saved document so references survive save / load / undo.
The owning GameObject; assigned by addComponent before onAttach runs.
Linear RGB color multiplier.
Luminous intensity in candela (cd) along the cone axis under the physical-units convention. Author in lumens via lumens.
Maximum range in world units.
Half-angle of the full-bright cone, in degrees.
Half-angle of the fade-to-zero cone, in degrees.
Whether this light renders a shadow map.
Optional cookie/projector texture sampled with the light's view-proj.
Index into the lighting pass's IES profile LUT (set via
PointSpotLightPass.setIesProfiles); -1 = no photometric profile. The
profile reshapes the cone falloff by the angle off the light's aim.
The simulation clock of the scene this component belongs to. Read inside
update (or any time after the GameObject is added to a scene) for
absolute time, frame count, FPS, and timeScale-aware delta — e.g.
this.time.elapsed, this.time.delta, this.time.frameCount.
this.time.delta equals the dt argument passed to update, so
components can ignore that argument entirely and pull everything from here.
Total luminous flux in lumens spread over the cone. Convenience view over
intensity: cd = lm / (2π·(1 − cos θ)), θ = the outerAngle
half-angle. Because it depends on the cone, set outerAngle first, then
lumens (a narrower cone yields more candela for the same flux).
Called once when the component is added to a GameObject. Override to acquire references to siblings/children or initialize resources.
Called once when the component is removed from its GameObject. Override to release resources or unsubscribe from events.
Called every frame by the GameObject's update traversal.
Frame delta time in seconds.
Called every frame by the GameObject's render traversal, after update and any input/controller mutations to the transform. Override to refresh per-frame state that render passes consume (e.g. Camera recomputes its cached view/projection matrices here).
Active render context (provides canvas width/height etc.).
World-space position of the light, taken from the GameObject's transform.
World-space forward direction of the light (GameObject local -Z, normalized).
Builds the perspective view-projection used by the spot shadow pass and projection texture sampling.
Near plane for the perspective frustum.
Cone-restricted spot light component.
Supplies the deferred lighting pass with a directional cone (range, inner/outer angles, optional projected texture) and, when shadowing is enabled, a single perspective view-projection consumed by the spot-light shadow pass.
Placed and aimed by its GameObject's transform; see worldPosition / worldDirection. Construct with no arguments and set fields, or pass SpotLightOptions.