We have a blocking error spam of decal error messages, preventing our artists from working.
It is likely related to the 2021 extended Decal features
We tested on a completely new HDRP project with just an empty cube and it keeps error spamming.
This is especially bad as all our artists can’t really work due to this, requiring restarts potentially every minute.
Reproduction:
Open new HDRP project
Do empty scene
Create prefab
Spawn Decal projector into prefab
Save prefab
Open and Quit Prefab 2-3 times
—> Exception spam starts, persists until Unity restart.
Happens in any 2021 LTS we tested.Urgent fix requested.
Thanks a lot for the feedback and the report. Can you send the case number here by any chance?
FYI, I was able to repro on my side and will push for it to be fixed asap!
Thanks, I can’t give an estimate to be honest, but since it’s a regression on an LTS, it will get fixed.
I will keep you posted once it gets looked at.
Hello, the fix has been made so considering the time to land the PR and the next published version, it should be available in a couple of weeks
If really critical you can manually modify the HDRP package to fix the issue:
In Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.cs, change the following function from
Also had this issue, editing the DecalProject.cs as noted fixed the issue for us. Thanks!
Just in case others are searching, here’s some keywords to help seo:
“MissingReferenceException: The object of type ‘DecalProjector’ has been destroyed but you are still trying to access it.”
Unity 2021.3 LTS, prefab error, camera controls not working in prefab mode
Open a Prefab that contains decals.
When you first open the prefab, there is a high probability that the prefab will open up correctly the first time. No major errors and the camera is working.
However, close the prefab and reopen. Now you are presented with multiple errors
“MissingReferenceException: The object of type ‘DecalProjector’ has been destroyed but you are still trying to access it.”
and you can no longer move the camera.
I tried following the steps above and unfortunately for us, if we correct the .ui file that the forum mentions as soon as we do anything in the Unity Project our changes to the UI file are lost as Unity automatically downloads the original ui file. This is due to the fact that our ui file is located in the runtime folder and not at the path mentioned above.
Is there a way around this issue?
I tried upgrading Unity to 2021.3.6 (released July 8th), however the bug was still present. This presents a major blocker to my team as many of our prefabs utilize decals.
Yes, it is fixed on our side but hasn’t landed in a public version for now, hopefully for the next 2021.3 one. (Backports always takes a bit more time)
If it’s critical, you can use the few lines of code shared by @adrien-de-tocquevilleabove .
The problem though is that that file is in the runtime folder on our end. So if we change it and switch back to Unity the file automatically gets reverted to what it was originally.