The referenced script on this Behaviour (Game Object 'StaticLightingSky') is missing! (HDRP Downgrade)
Hey, I'm encountering a little issue with my project :
I've reticently tried working with the HDRP, but I've realized after the fact that it was a little too much so I've downgraded my project to LWRP. After that, I've upgraded my project to Unity 2019.3 and so, made the transition to URP (which is the old LWRP now available by default if I understood correctly).
But since I've done all of that, I have two exceptions showing in the console every-time I spawn a new camera, which are :
The referenced script (Unknown) on this Behaviour is missing!
The referenced script on this Behaviour (Game Object 'StaticLightingSky') is missing! I guess those are leftovers from my trials under HDRP (since "StaticLightingSky" are HDRP elements), but I can't find any missing scripts in my objects. It doesn't break the project in any way and I can continue to work and play. But it's annoying, since it take so much space in the console.
So i was wondering if you people have a way to find the faulty objects so I can correct/remove them (or an idea of which objects can be faulty).
Thanks in advance.
Answer by Nakou · Feb 13, 2020 at 05:17 PM
Okay so I found the issue : It was some Point lights placed during my tests with HDRP but that I had forgot to remove (and that had missing script). Also it seems (still stress testing at the moment) to have fixed random crash I had on editors and standalone (when working on lights and baking) (linked to PROCESSSHADOWCASTERNODEVISIBILITYANDCULLWITHOUTUMBRA in the crash log apparently).
Good to know : if when double clicking a warning/error in the console after stopping the game will do nothing, pausing and clicking will actually send you to the gameobject concerned.
My mistake was that I was always trying to investigate after stopping the game, and not during its execution.
I ran into the same problem. Changed my pipeline from HDRP to URP and got the same error. Did you deter$$anonymous$$e if it is safe to attempt to delete something causing this reference bug, or best just leave it be?
I'm facing the same issue but the object does not exist in the Hierarchie and in the project. I'm facing a kind of ghost inside the project ... I've no idea on how to correct this ?
I had the same issue. I could remove it by pressing F while hovering over the Hierarchy with the mouse, and then press Delete. $$anonymous$$ake sure you're not in play mode when deleting.
As a side note: double clicking the warning in Console Pro did nothing for me. I had to use the Unity Console.
Same problem in Unity 2020.2.0b6.... I even tried out finding my $$anonymous$$issing scripts using the scripts supplied here: http://wiki.unity3d.com/index.php?title=Find$$anonymous$$issingScripts But nothing was found. $$anonymous$$y scene seems to be clear of any missing scripts. Clicking on a warning also does nothing... They only appear on Application start once, afterwards nothing triggers them again.
I $$anonymous$$ANAGED TO SOLVE IT. The "Find$$anonymous$$issingScriptsRecusive" script only searched the gameobjects in the scene, but not instantiated Prefabs. One of my prefabs in my scene had missing scripts. Apparently, Unity isn't able to highlight prefabs when clicking on the warning message, nor does the script find them. Somewhat strange behaviour, for now just check the prefabs in your scene for missing scripts manually.
Answer by krisdaniel1452 · Feb 22, 2021 at 11:21 PM
Solution: ctrl+shift+f in your code editor (rider, vscode etc.) to search globally for StaticLightingSky. You will find a reference in a scene file. Remove these lines of code