Skip to content

API > Light


Light⚓︎

Light inherits from Behaviour

Script interface for light components.
Use this to control all aspects of Unity's lights. The properties are an exact match for the values shown in the Inspector.
Check out Unity Light API

Members⚓︎

Properties⚓︎

Name Description
Light.areaSizeProperty The size of the area light (Editor only).
Light.bakingOutputProperty This property describes the output of the last Global Illumination bake.
Light.bounceIntensityProperty The multiplier that defines the strength of the bounce lighting.
Light.boundingSphereOverrideProperty Bounding sphere used to override the regular light bounding sphere during culling.
Light.colorProperty The color of the light.
Light.commandBufferCountProperty Number of command buffers set up on this light (Read Only).
Light.cookieProperty The cookie texture projected by the light.
Light.cookieSizeProperty The size of a directional light's cookie.
Light.cullingMaskProperty This is used to light certain objects in the Scene selectively.
Light.flareProperty The flare asset to use for this light.
Light.innerSpotAngleProperty The angle of the light's spotlight inner cone in degrees.
Light.intensityProperty The Intensity of a light is multiplied with the Light color.
Light.layerShadowCullDistancesvProperty Per-light, per-layer shadow culling distances.
Light.rangeProperty The range of the light.
Light.renderingLayerMaskProperty Determines which rendering LayerMask this Light affects.
Light.renderModeProperty How to render the light.
Light.shadowAngleProperty Controls the amount of artificial softening applied to the edges of shadows cast by directional lights.
Light.shadowBiasProperty Shadow mapping constant bias.
Light.shadowCustomResolutionProperty The custom resolution of the shadow map.
Light.shadowMatrixOverrideProperty Projection matrix used to override the regular light matrix during shadow culling.
Light.shadowNearPlaneProperty Near plane value to use for shadow frustums.
Light.shadowNormalBiasProperty Shadow mapping normal-based bias.
Light.shadowRadiusProperty Controls the amount of artificial softening applied to the edges of shadows cast by the Point or Spot light.
Light.shadowResolutionProperty The resolution of the shadow map.
Light.shadowsProperty How this light casts shadows
Light.shapeProperty This property describes the shape of the spot light. Only Scriptable Render Pipelines use this property; the built-in renderer does not support it.
Light.spotAngleProperty The angle of the light's spotlight cone in degrees.
Light.typeProperty The type of the light.
Light.useBoundingSphereOverrideProperty Set to true to override light bounding sphere for culling.
Light.useColorTemperatureProperty Set to true to use the color temperature.
Light.useShadowMatrixOverrideProperty Set to true to enable custom matrix for culling during shadows.

Inherited Members⚓︎

Inherited Properties⚓︎

Name Description
Light.enabledProperty Enabled Behaviours are Updated, disabled Behaviours are not.
Light.isActiveAndEnabledProperty Has the Behaviour had active and enabled called?
Light.gameObjectPropertyReadonly Property The game object this component is attached to. A component is always attached to a game object.
Light.tagPropertyReadonly Property The tag of this game object.
Light.transformPropertyReadonly Property The Transform attached to this GameObject.
Light.hideFlagsProperty Should the object be hidden, saved with the Scene or modifiable by the user?
Light.nameProperty The name of the object.

Inherited Methods⚓︎

Name Description
Light.BroadcastMessage(methodName, parameter=nil)Method Calls the method named methodName on every Lua Script in this game object or any of its children.
Light.CompareTag(tag)Method Is this game object tagged with tag ?
Light.GetAllLuaScripts()Method Returns an array of all Lua scripts that attached to the game object.
Light.GetComponent(type)Method Returns the component of Type type if the game object has one attached, nil if it doesn't.
Light.GetComponentInChildren(t)Method Returns the component of Type type in the GameObject or any of its children using depth first search.
Light.GetComponentInParent(t)Method Returns the component of Type type in the GameObject or any of its parents.
Light.GetComponents(type)Method Returns all components of Type type in the GameObject.
Light.GetComponentsInChildren(t)Method Returns all components of Type type in the GameObject or any of its children.
Light.GetComponentsInParent(t)Method Returns all components of Type type in the GameObject or any of its parents.
Light.SendMessage(methodName, value=nil)Method Calls the method named methodName on every Lua Script in this game object.
Light.SendMessageUpwards(methodName, value=nil)Method Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour.
Light.TryGetComponent(type)Method Gets the component of the specified type, if it exists.
Light.GetInstanceID()Method Returns the instance id of the object.