Light
info
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 .areaSize | The size of the area light (Editor only). |
Light .bakingOutput | This property describes the output of the last Global Illumination bake. |
Light .bounceIntensity | The multiplier that defines the strength of the bounce lighting. |
Light .boundingSphereOverride | Bounding sphere used to override the regular light bounding sphere during culling. |
Light .color | The color of the light. |
Light .commandBufferCount | Number of command buffers set up on this light (Read Only). |
Light .cookie | The cookie texture projected by the light. |
Light .cookieSize | The size of a directional light's cookie. |
Light .cullingMask | This is used to light certain objects in the Scene selectively. |
Light .flare | The flare asset to use for this light. |
Light .innerSpotAngle | The angle of the light's spotlight inner cone in degrees. |
Light .intensity | The Intensity of a light is multiplied with the Light color. |
Light .layerShadowCullDistancesv | Per-light, per-layer shadow culling distances. |
Light .range | The range of the light. |
Light .renderingLayerMask | Determines which rendering LayerMask this Light affects. |
Light .renderMode | How to render the light. |
Light .shadowAngle | Controls the amount of artificial softening applied to the edges of shadows cast by directional lights. |
Light .shadowBias | Shadow mapping constant bias. |
Light .shadowCustomResolution | The custom resolution of the shadow map. |
Light .shadowMatrixOverride | Projection matrix used to override the regular light matrix during shadow culling. |
Light .shadowNearPlane | Near plane value to use for shadow frustums. |
Light .shadowNormalBias | Shadow mapping normal-based bias. |
Light .shadowRadius | Controls the amount of artificial softening applied to the edges of shadows cast by the Point or Spot light. |
Light .shadowResolution | The resolution of the shadow map. |
Light .shadows | How this light casts shadows |
Light .shape | 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 .spotAngle | The angle of the light's spotlight cone in degrees. |
Light .type | The type of the light. |
Light .useBoundingSphereOverride | Set to true to override light bounding sphere for culling. |
Light .useColorTemperature | Set to true to use the color temperature. |
Light .useShadowMatrixOverride | Set to true to enable custom matrix for culling during shadows. |
Inherited Members
Inherited Properties
Name | Description |
---|---|
Light .enabled | Enabled Behaviours are Updated, disabled Behaviours are not. |
Light .isActiveAndEnabled | Has the Behaviour had active and enabled called? |
Light .gameObject | The game object this component is attached to. A component is always attached to a game object. |
Light .tag | The tag of this game object. |
Light .transform | The Transform attached to this GameObject. |
Light .hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? |
Light .name | The name of the object. |
Inherited Methods
Name | Description |
---|---|
Light .BroadcastMessage(methodName, parameter=nil) | Calls the method named methodName on every Lua Script in this game object or any of its children. |
Light .CompareTag(tag) | Is this game object tagged with tag ? |
Light .GetAllLuaScripts() | Returns an array of all Lua scripts that attached to the game object. |
Light .GetComponent(type) | Returns the component of Type type if the game object has one attached, nil if it doesn't. |
Light .GetComponentInChildren(t) | Returns the component of Type type in the GameObject or any of its children using depth first search. |
Light .GetComponentInParent(t) | Returns the component of Type type in the GameObject or any of its parents. |
Light .GetComponents(type) | Returns all components of Type type in the GameObject. |
Light .GetComponentsInChildren(t) | Returns all components of Type type in the GameObject or any of its children. |
Light .GetComponentsInParent(t) | Returns all components of Type type in the GameObject or any of its parents. |
Light .SendMessage(methodName, value=nil) | Calls the method named methodName on every Lua Script in this game object. |
Light .SendMessageUpwards(methodName, value=nil) | Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour. |
Light .TryGetComponent(type) | Gets the component of the specified type, if it exists. |
Light .GetInstanceID() | Returns the instance id of the object. |