Search Issue Tracker
Fixed in 2018.3
[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/Unityfirstname.lastname@example.org/HDRP/Lighting/LightLoop/LightLoop.cs:1494)
UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipeline.Render (ScriptableRenderContext renderContext, UnityEngine.Camera cameras) (at C:/Users/Utilisateur/AppData/Local/Unityemail@example.com/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)
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.
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
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [iOS] SystemInfo.systemMemorySize returns negative values
- [Physics Debugger] Colliders are visualized even if their Layer is not selected in the Show Layers property
- Crash on PAL_LocalIPC_IsConnected when IPC fails on launch
- [macOS] Video Player's 5.1 audio channel layout is incorrect when outputting to Audio Source
- AssetDatabase is overwriting GUIDs