Search Unity

Unity Editor can't access 2d lights

Discussion in 'Editor & General Support' started by andrew7fls, Dec 4, 2019.

  1. andrew7fls

    andrew7fls

    Joined:
    Jan 8, 2016
    Posts:
    1
    Hi

    Trying to access the 2D lights in the Universal Render Pipeline - when I go to create a new game object of a 2d light, all five options are greyed out.

    I also have this error coming up in the Console which I assume is the problem:

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.Experimental.Rendering.Universal.Light2DEditorUtility.GetRenderer2DData () (at Library/PackageCache/com.unity.render-pipelines.universal@7.1.6/Editor/2D/Light2DEditorUtility.cs:103)
    UnityEditor.Experimental.Rendering.Universal.Light2DEditorUtility.IsUsing2DRenderer () (at Library/PackageCache/com.unity.render-pipelines.universal@7.1.6/Editor/2D/Light2DEditorUtility.cs:115)
    UnityEditor.Experimental.Rendering.Universal.Renderer2DMenus.CreateLightValidation () (at Library/PackageCache/com.unity.render-pipelines.universal@7.1.6/Editor/2D/Renderer2DMenus.cs:76)
    UnityEditor.Experimental.Rendering.Universal.Renderer2DMenus.CreateFreeformLight2DValidation () (at Library/PackageCache/com.unity.render-pipelines.universal@7.1.6/Editor/2D/Renderer2DMenus.cs:88)


    I have tried re-installing the URP package and also tried different versions of Unity.

    Any help with this would be amazing - thank you.
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    94