Search Issue Tracker
Fixed in 2018.3.X
Votes
4
Found in
Issue ID
1059208
Regression
No
[HDPR] Null Reference Exception when using Particle System Lighting Module
SRP Repo: Issue #1650
When using Unity Particles with the light module enabled, it breaks the scene's lighting, stops the particle system and spam the following error :
"NullReferenceException: Object reference not set to an instance of an object
UnityEngine.Experimental.Rendering.HDPipeline.LightLoop.PrepareLightsForGPU (UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Experimental.Rendering.HDPipeline.HDCamera hdCamera, UnityEngine.Experimental.Rendering.ShadowSettings shadowSettings, CullResults cullResults, UnityEngine.Experimental.Rendering.HDPipeline.ReflectionProbeCullResults reflectionProbeCullResults, DensityVolumeList densityVolumes) (at C:/Users/Utilisateur/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.render-pipelines.high-definition@2.0.4-preview.1/HDRP/Lighting/LightLoop/LightLoop.cs:1494)
UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipeline.Render (ScriptableRenderContext renderContext, UnityEngine.Camera[] cameras) (at C:/Users/Utilisateur/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.render-pipelines.high-definition@2.0.4-preview.1/HDRP/RenderPipeline/HDRenderPipeline.cs:930)
UnityEngine.Experimental.Rendering.RenderPipelineManager.DoRenderLoop_Internal (IRenderPipelineAsset pipe, UnityEngine.Camera[] cameras, IntPtr loopPtr) (at C:/buildslave/unity/build/Runtime/Export/RenderPipeline/RenderPipelineManager.cs:32)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)"
The message stops if I set all particle system's light module parameters to a value of 0 (which is the same as disabling it, it doesn't use the light).
The error both works in play and edit mode.
Packages used : HDRenderPipeline 2.0.4 preview
Project : empty project with the HDRP template used.
Reproduce :
Create project with the HDRP Template
Update HDRP package to 2.0.4 in package manager
Create a new particle system
Create a new point light
Enable the Light module of the particle system
Set the ratio to a value like 1
Add the point light previously created to the particle system's light module
Watch the scene lighting die instantly and the console spamming errors
Unity version : 2018.2.0f2
PC Standalone on Windows 10
Comments (10)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shader Graph Asset icon is not shown on creation unless you confirm the name
- APV Sky occlusion doesn't consider the terrain
- [iOS] "EXC_BAD_ACCESS" Player crash when Script Debugging is enabled
- Cursor skips input fields when tabbing between two sets of input fields
- "Shader error redefinition of 'Varyings'" error appears when selecting the shader
DWS
Feb 12, 2020 01:27
The number of recent bugs is intolerable. Really crazy.
BigRookGames
Nov 24, 2019 15:00
Yes, I am using 2019.3.0gb12 and it is still present. Seems that this has been an issue since July, this should be reopened or recreated for visibility. How do reoccurring bugs get handled? reopened or recreated normally?
Peter77
Nov 23, 2019 19:45
Related Forum thread:
https://forum.unity.com/threads/particle-systems-with-lights-bugged.693514/
MajorParts
Nov 21, 2019 02:02
Bug still exists in 2019.3.0b11 with HDRP 7.1.5
ArmoniusXIV
Sep 04, 2019 12:22
Yep, 2019.2.0f1 & HDRP 6.9.1. Same problem. Night lasers useless.
teemuer
Aug 29, 2019 19:21
I have the same problem in 2019.2.0f1 HDRP 6.9.1.
Ubernt
Aug 29, 2019 16:57
Issue is present in Unity 2019.2.0f1 version
JustLoren
Aug 14, 2019 18:54
How do you reopen an issue? It's happening for me in 2019.2.0f1 with HDRP 6.9.1
xDavidLeon
Jul 31, 2019 11:18
This is happening again in 2019.2.0f1 with HDRP 6.9.1.
DougRichardson
Oct 10, 2018 01:00
What version of 2018.3 is this fixed in? I'm on 2018.3.0b4 (the latest publicly available beta at this time) and this problem still occurs.