Skip to main content

Light

info
  • This class is only available in a Local environment

The Light class is a component which interacts with Unity Lights.

To get a Light component from an item, use the GetComponent method.

let lightComponent = item.GetComponent("Light")

You can then use the lightComponent property to access the Light class.

Properties

Property NameTypeDescription
IsEnabledboolChecks if the Light component is Enabled
TypeLightTypeGets the type of light
RangefloatThe range of each point of the light
IntensityfloatThe intensity of a light
SpotAnglefloat(SpotLight) The angle of a spot light's cone in degrees
InnerSpotAnglefloat(SpotLight) The angle of a spot light's inner cone in degrees
ColorColorThe light's color
UseColorTemperatureboolWhether or not to use Color Temperature for the light
ColorTemperaturefloatThe color temperature of the light
LightShadowsLightShadowsHow the light casts shadows
ShadowStrengthfloatThe strength of the shadows