Search Issue Tracker
Fixed in 2021.3.11f1
Fixed in 2021.3.X, 2022.1.X, 2022.2.X, 2023.1.X, 2023.1.0a8
Votes
0
Found in
2021.3.8f1
2022.1.13f1
2022.2.0a16
2023.1.0a1
Issue ID
UUM-4353
Regression
No
[HDRP] Deleting a decal material that is currently in use crashes the render loop
Version tested: 2022.2.a16 (17114ee23d5f) + HDRP from Packman
Steps to reproduce:
1) Simply create an empty HDRP project
2) Create a decal material, a decal project and assign mew material to it
3) Delete the decal
4) Observe that projector is showing Material missing and render loop breaks
Note: Same happens with decal SG
Proposed result: projector fallbacks to default decal mat to avoid this.
{code:java}
MissingReferenceException: The object of type 'Material' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Rendering.HighDefinition.DecalSystem+DecalSet.UpdateCachedDrawOrder () (at D:/GIT/unity/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs:507)
UnityEngine.Rendering.HighDefinition.DecalSystem.CreateDrawData () (at D:/GIT/unity/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs:1110)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.ExecuteRenderRequest (UnityEngine.Rendering.HighDefinition.HDRenderPipeline+RenderRequest renderRequest, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.HighDefinition.AOVRequestData aovRequest) (at D:/GIT/unity/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs:2133)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) (at D:/GIT/unity/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs:2006)
UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <facf35b0ea244f54b1444810b978175e>:0)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, System.Collections.Generic.List`1[T] renderRequests, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <facf35b0ea244f54b1444810b978175e>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&){code}
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Camera.allCameras returns cameras from all loaded Scenes when using multi-Scene setup
- Camera.layerCullDistances has no effect when GPU Resident Drawer is enabled
- ARM64 and ARMv7 APKs return the same version code when "Split APKs by target architecture" is enabled
- Crash on ProfilerMutexLock when closing a project with specific Assets
- “Callback unregistration failed. Callback not registered.” is thrown when changing layouts with two "Font Asset Creator" windows docked
Add comment