docs.unity3d.com
    Show / Hide Table of Contents

    Class Light2D

    Class Light2D is a 2D light which can be used with the 2D Renderer.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    Light2D
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(String)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(Object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(String)
    Component.SendMessageUpwards(String, Object, SendMessageOptions)
    Component.SendMessageUpwards(String, Object)
    Component.SendMessageUpwards(String)
    Component.SendMessageUpwards(String, SendMessageOptions)
    Component.SendMessage(String, Object)
    Component.SendMessage(String)
    Component.SendMessage(String, Object, SendMessageOptions)
    Component.SendMessage(String, SendMessageOptions)
    Component.BroadcastMessage(String, Object, SendMessageOptions)
    Component.BroadcastMessage(String, Object)
    Component.BroadcastMessage(String)
    Component.BroadcastMessage(String, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    Object.FindObjectOfType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Experimental.Rendering.Universal
    Syntax
    [ExecuteAlways]
    [DisallowMultipleComponent]
    [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 : MonoBehaviour, ISerializationCallbackReceiver

    Properties

    blendStyleIndex

    The lights current operation index

    Declaration
    public int blendStyleIndex { get; set; }
    Property Value
    Type Description
    Int32

    color

    The lights current color

    Declaration
    public Color color { get; set; }
    Property Value
    Type Description
    Color

    falloffIntensity

    Declaration
    public float falloffIntensity { get; }
    Property Value
    Type Description
    Single

    intensity

    The lights current intensity

    Declaration
    public float intensity { get; set; }
    Property Value
    Type Description
    Single

    lightCookieSprite

    Declaration
    public Sprite lightCookieSprite { get; }
    Property Value
    Type Description
    Sprite

    lightOrder

    Declaration
    public int lightOrder { get; set; }
    Property Value
    Type Description
    Int32

    lightType

    The lights current type

    Declaration
    public Light2D.LightType lightType { get; set; }
    Property Value
    Type Description
    Light2D.LightType

    normalMapDistance

    Declaration
    public float normalMapDistance { get; }
    Property Value
    Type Description
    Single

    normalMapQuality

    Declaration
    public Light2D.NormalMapQuality normalMapQuality { get; }
    Property Value
    Type Description
    Light2D.NormalMapQuality

    overlapOperation

    Declaration
    public Light2D.OverlapOperation overlapOperation { get; }
    Property Value
    Type Description
    Light2D.OverlapOperation

    pointLightInnerAngle

    Declaration
    public float pointLightInnerAngle { get; set; }
    Property Value
    Type Description
    Single

    pointLightInnerRadius

    Declaration
    public float pointLightInnerRadius { get; set; }
    Property Value
    Type Description
    Single

    pointLightOuterAngle

    Declaration
    public float pointLightOuterAngle { get; set; }
    Property Value
    Type Description
    Single

    pointLightOuterRadius

    Declaration
    public float pointLightOuterRadius { get; set; }
    Property Value
    Type Description
    Single

    shadowIntensity

    Specifies the darkness of the shadow

    Declaration
    public float shadowIntensity { get; set; }
    Property Value
    Type Description
    Single

    shadowsEnabled

    Specifies that the shadows are enabled

    Declaration
    public bool shadowsEnabled { get; set; }
    Property Value
    Type Description
    Boolean

    shadowVolumeIntensity

    Specifies the darkness of the shadow

    Declaration
    public float shadowVolumeIntensity { get; set; }
    Property Value
    Type Description
    Single

    shapeLightFalloffSize

    Declaration
    public float shapeLightFalloffSize { get; }
    Property Value
    Type Description
    Single

    shapeLightParametricAngleOffset

    Declaration
    public float shapeLightParametricAngleOffset { get; }
    Property Value
    Type Description
    Single

    shapeLightParametricRadius

    Declaration
    public float shapeLightParametricRadius { get; }
    Property Value
    Type Description
    Single

    shapeLightParametricSides

    Declaration
    public int shapeLightParametricSides { get; }
    Property Value
    Type Description
    Int32

    shapePath

    Declaration
    public Vector3[] shapePath { get; }
    Property Value
    Type Description
    Vector3[]

    volumeIntensity

    Declaration
    public float volumeIntensity { get; }
    Property Value
    Type Description
    Single

    volumeIntensityEnabled

    Declaration
    public bool volumeIntensityEnabled { get; set; }
    Property Value
    Type Description
    Boolean

    volumetricShadowsEnabled

    Specifies that the volumetric shadows are enabled

    Declaration
    public bool volumetricShadowsEnabled { get; set; }
    Property Value
    Type Description
    Boolean

    Methods

    OnAfterDeserialize()

    Declaration
    public void OnAfterDeserialize()
    Implements
    ISerializationCallbackReceiver.OnAfterDeserialize()

    OnBeforeSerialize()

    Declaration
    public void OnBeforeSerialize()
    Implements
    ISerializationCallbackReceiver.OnBeforeSerialize()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023