Same thing for me. 6.0 LTS
I migrated a project with a TON of shadow casters with shape edits. They are the source of the spammed errors in the console same as OP.
Update:
I tried the following with no success
Delete library and recreate
Reinstall URP
Reimport Assets
Delete the shadow caster 2D and make a new one
I noticed this issue for me was only related to the editor so far that I can tell. The shadows in the game seem to be working. For me, if I collapse the shadow caster 2D element in the inspector the errors stop - I believe its literally just trying to draw some field in the inspector and issuing an error.
Having the same problem. I didn’t realize it was because of “Shape Editor” set as the “Casting Source”, thanks for pointing that out.
Double-clicking on the error takes me to the ShadowShape2DProvider_ProperyDrawer class and specifically line 30:
Type parentType = parentObj.GetType();
I’ve had this happen in two projects: one where I created a new 2D URP project and added a variety of new assets from an old project (just copy-pasting them into the Assets folder basically), and one where I just added a few sprites.
I’m very sorry this is so late, but I overlooked the email notification of your message.
I’m not currently encountering about it because I’m working in some other areas, but I’m probably come across it again eventually.
My bug report was closed due to it being a duplicate. IN-106786
Last I read, “Resolution Notes: null Duplicate of another internal issue: UUM-97647: ShadowCaster2D Throws NullReferenceException when using ShapeEditor casting source
Izabelė G said, “The fix is actively worked on and should be available from 6000.0.53f1, 6000.1.11f1 and 6000.2.0a9 Editor versions.”