Search Issue Tracker

Fixed in 2018.3



Found in

Issue ID




[HDPR] Null Reference Exception when using Particle System Lighting Module

Graphics - General


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/
UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipeline.Render (ScriptableRenderContext renderContext, UnityEngine.Camera[] cameras) (at C:/Users/Utilisateur/AppData/Local/Unity/cache/packages/
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)

  1. B8c9231f6cbf2d808724e463e71278e8?d=mm


    Feb 12, 2020 01:27

    The number of recent bugs is intolerable. Really crazy.

  2. Ffa645a20d8114f8371a3f888434ae13?d=mm


    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?

  3. 495e55a1ab7af58b9c2dbec7b81135f1?d=mm


    Nov 23, 2019 19:45

  4. B3fae40261cc4350393aee4f85398da4?d=mm


    Nov 21, 2019 02:02

    Bug still exists in 2019.3.0b11 with HDRP 7.1.5

  5. Eb3f88c16b100c44b9d79094f7b45fd5?d=mm


    Sep 04, 2019 12:22

    Yep, 2019.2.0f1 & HDRP 6.9.1. Same problem. Night lasers useless.

  6. 39f3c89a4f290316b44c5c03bc38c831?d=mm


    Aug 29, 2019 19:21

    I have the same problem in 2019.2.0f1 HDRP 6.9.1.

  7. Ddfd2f4651e09b858b96e1b0bae196a8?d=mm


    Aug 29, 2019 16:57

    Issue is present in Unity 2019.2.0f1 version

  8. Da0def85542816b68cd9fab9b4f53ef1?d=mm


    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

  9. 06668b5abeaf77069c59424e3759c450?d=mm


    Jul 31, 2019 11:18

    This is happening again in 2019.2.0f1 with HDRP 6.9.1.

  10. 3a546ba8b3a3c060afe34ec9489e372d?d=mm


    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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.