Greetings!
I want to preface by saying I am new to unity so this might be a common issue, but I can’t find any relevant information on this anywhere.
I am using URP 2D to create a game for a school project and before today I didn’t face any issues with URP that I couldn’t find online.
Whenever I open the inspector on a GameObject with a ShadowCaster2D component, I get bombarded with this error whenever I set it’s casting source on either Shape Editor or None.
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Rendering.Universal.ShadowShape2DProvider_ProperyDrawer.ProcessChildren (UnityEditor.SerializedProperty parentProperty, UnityEditor.Rendering.Universal.ShadowShape2DProvider_ProperyDrawer+ProcessChild onProcessChild) (at ./Library/PackageCache/com.unity.render-pipelines.universal@0b68ece7aa54/Editor/2D/Shadows/ShadowProvider/ShadowShape2DProvider_ProperyDrawer.cs:30)
UnityEditor.Rendering.Universal.ShadowShape2DProvider_ProperyDrawer.GetPropertyHeight (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at ./Library/PackageCache/com.unity.render-pipelines.universal@0b68ece7aa54/Editor/2D/Shadows/ShadowProvider/ShadowShape2DProvider_ProperyDrawer.cs:68)
UnityEditor.PropertyDrawer.GetPropertyHeightSafe (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at <b47d645d7067453f81375d5477450acd>:0)
UnityEditor.PropertyHandler.GetHeight (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at <b47d645d7067453f81375d5477450acd>:0)
UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at <b47d645d7067453f81375d5477450acd>:0)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at <b47d645d7067453f81375d5477450acd>:0)
UnityEditor.Rendering.Universal.ShadowCaster2DEditor.OnInspectorGUI () (at ./Library/PackageCache/com.unity.render-pipelines.universal@0b68ece7aa54/Editor/2D/Shadows/ShadowCaster2DEditor.cs:134)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass79_0.<CreateInspectorElementUsingIMGUI>b__0 () (at <b47d645d7067453f81375d5477450acd>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I don’t know how to read the error logs, nor have I found a similar post anywhere.
Edit:
This error also shows up but not nearly as frequently
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Rendering.Universal.ShadowShape2DProvider_ProperyDrawer.ProcessChildren (UnityEditor.SerializedProperty parentProperty, UnityEditor.Rendering.Universal.ShadowShape2DProvider_ProperyDrawer+ProcessChild onProcessChild) (at ./Library/PackageCache/com.unity.render-pipelines.universal@0b68ece7aa54/Editor/2D/Shadows/ShadowProvider/ShadowShape2DProvider_ProperyDrawer.cs:30)
UnityEditor.Rendering.Universal.ShadowShape2DProvider_ProperyDrawer.GetPropertyHeight (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at ./Library/PackageCache/com.unity.render-pipelines.universal@0b68ece7aa54/Editor/2D/Shadows/ShadowProvider/ShadowShape2DProvider_ProperyDrawer.cs:68)
UnityEditor.PropertyDrawer.GetPropertyHeightSafe (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at <b47d645d7067453f81375d5477450acd>:0)
UnityEditor.PropertyHandler.GetHeight (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at <b47d645d7067453f81375d5477450acd>:0)
UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at <b47d645d7067453f81375d5477450acd>:0)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at <b47d645d7067453f81375d5477450acd>:0)
UnityEditor.Rendering.Universal.ShadowCaster2DEditor.OnInspectorGUI () (at ./Library/PackageCache/com.unity.render-pipelines.universal@0b68ece7aa54/Editor/2D/Shadows/ShadowCaster2DEditor.cs:134)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass79_0.<CreateInspectorElementUsingIMGUI>b__0 () (at <b47d645d7067453f81375d5477450acd>:0)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()