Class Light2D
Class Light2D
is a 2D light which can be used with the 2D Renderer.
Implements
Inherited Members
Namespace: UnityEngine.Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.2D.Runtime.dll
Syntax
[ExecuteAlways]
[DisallowMultipleComponent]
[MovedFrom(true, "UnityEngine.Experimental.Rendering.Universal", "Unity.RenderPipelines.Universal.Runtime", null)]
[AddComponentMenu("Rendering/2D/Light 2D")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html?subfolder=/manual/2DLightProperties.html")]
public sealed class Light2D : Light2DBase, ISerializationCallbackReceiver
Properties
Name | Description |
---|---|
blendStyleIndex | The lights current operation index |
color | The lights current color |
falloffIntensity | Controls the brightness and distance of the fall off (edge) of the light |
intensity | The lights current intensity |
lightCookieSprite | The Sprite that's used by the Sprite Light type to control the shape light |
lightOrder | Gets or sets the light order. The lightOrder determines the order in which the lights are rendered onto the light textures. |
lightType | The light's current type |
normalMapDistance | The simulated z distance of the light from the surface used in normal map calculation. |
normalMapQuality | Returns the calculation quality for the normal map rendering. Please refer to NormalMapQuality. |
overlapOperation | Controls the overlap operation mode. |
pointLightInnerAngle | The inner angle of the point light shape. The bigger the angle, the wider the gap. The gap between the innner and outer angle will determine the size of the light's penumbra. |
pointLightInnerRadius | The radius of the inner light area that has full brightness. The gap between the inner and outer radius will determine the size of the light's penumbra. |
pointLightOuterAngle | The angle that determins the shape of the inner light area. The gap between the innner and outer angle will determine the size of the light's penumbra. |
pointLightOuterRadius | The outer radius that determines the size of the light. The gap between the inner and outer radius will determine the size of the light's penumbra. |
renderVolumetricShadows | Returns if volumetric shadows should be rendered. |
shadowIntensity | Specifies the darkness of the shadow |
shadowSoftness | Specifies the softness of the soft shadow |
shadowSoftnessFalloffIntensity | Controls the falloff for soft shadows |
shadowVolumeIntensity | Specifies the darkness of the shadow |
shadowsEnabled | Specifies that the shadows are enabled |
shapeLightFalloffSize | The size of the fall-off area. Bigger value corresponds to bigger fall off size. |
shapeLightParametricAngleOffset | The offset of the shape from the light's origin. |
shapeLightParametricRadius | The size of the shape. |
shapeLightParametricSides | The number of sides in the parametric shape. |
shapePath | Returns the path that represents the shape light. Values are in object space. |
volumeIntensity | Controls the visibility of the light's volume |
volumetricEnabled | Enables or disables the light's volume |
volumetricShadowsEnabled | Specifies that the volumetric shadows are enabled |
Methods
Name | Description |
---|---|
OnAfterDeserialize() | OnAfterSerialize implementation. |
OnBeforeSerialize() | OnBeforeSerialize implementation. |
SetShapePath(Vector3[]) | Set the shape that represents the freeform light. Values are in object space. |