Search Issue Tracker
Duplicate
Votes
0
Found in [Package]
11.0.0
Issue ID
1307127
Regression
Yes
[URP] UnassignedReferenceException thrown when Sprite Light Type is selected in the Inspector
On Selecting Sprite Light Type under Light 2D Component in the Inspector causes the editor to throw UnassignedReferenceException, Refer to the attached video.
Steps to repro:
1. Create a new Project with URP Template
2. Project > Create > Rendering > Universal Render Pipeline > 2D Renderer
3. Assign 2D Renderer in the URP Asset
4. Hierarchy > Create > Light > Global Light 2D
5. Inspector > Light 2D > Light Type > Sprite
Actual Result:
UnassignedReferenceException is thrown on selecting Sprite Light Type under Light 2D Component in the Inspector
Expected Result:
Sprite Light Type is selected gracefully
Reproducible on:
2021.2.0a2, 2021.1.0b3, 2021.1.0a10 with pacakge version 11.0.0
Working fine on:
2021.1.0a9, 2020.2.2f1 with package version 10.2.2
Environment:
Windows 10, macOS 10.15
Stack trace:
UnassignedReferenceException: The variable m_LightCookieSprite of Light2D has not been assigned.
You probably need to assign the m_LightCookieSprite variable of the Light2D script in the inspector.
UnityEngine.Experimental.Rendering.Universal.LightUtility.GenerateSpriteMesh (UnityEngine.Experimental.Rendering.Universal.Light2D light, UnityEngine.Sprite sprite) (at Library/PackageCache/com.unity.render-pipelines.universal@11.0.0/Runtime/2D/LightUtility.cs:446)
UnityEngine.Experimental.Rendering.Universal.Light2D.UpdateMesh (System.Boolean forceUpdate) (at Library/PackageCache/com.unity.render-pipelines.universal@11.0.0/Runtime/2D/Light2D.cs:250)
UnityEditor.Experimental.Rendering.Universal.Light2DEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.render-pipelines.universal@11.0.0/Editor/2D/Light2DEditor.cs:820)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <37a04eb03f2448cf8503c9b487945f53>:0)
UnityEditor.PopupCallbackInfo:SetEnumValueDelegate(Object, String[], Int32)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shader Graph Node information is briefly displayed in Graph Inspector when clicking on Category in the Blackboard
- Module installation fails with "Download failed: Validation Failed" errors when using beta.2 Hub version
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
- Shader Graph Category dropdown cannot be expanded/collapsed when clicking on the text
- Different text alignment in the column header in Entities "System" window
Add comment