AtmosphericScattering NullReferenceException
Quote from heddesheimer on December 10, 2021, 7:35 pmHi,
I have built a scene that works all fine, but when I start the game, I get "NullReferenceException: Object reference not set to an instance of an object" somewhere in AtmosphericScattering. I can fix it by disabling the script AtmosphericScattering in Scene Settings, but I would like to know what I am missing here.
Thanks
Marian
Hi,
I have built a scene that works all fine, but when I start the game, I get "NullReferenceException: Object reference not set to an instance of an object" somewhere in AtmosphericScattering. I can fix it by disabling the script AtmosphericScattering in Scene Settings, but I would like to know what I am missing here.
Thanks
Marian
Quote from terraunity on December 12, 2021, 11:07 amHi Marian, please copy/paste the whole error log from Unity console so that we can track it down. Sometimes effect's references are lost during Unity import so reimporting the Atmospheric Scattering folder under Graphics directory may help.
Hi Marian, please copy/paste the whole error log from Unity console so that we can track it down. Sometimes effect's references are lost during Unity import so reimporting the Atmospheric Scattering folder under Graphics directory may help.
Quote from heddesheimer on December 12, 2021, 2:55 pmHi,
thanks for the fast reply. It may be related to my switch to universal render pipeline because I needed special effects on some of my game objects. I saw later, that TerraUnity does not support VFX with scripted render pipelines. Sorry, I'm pretty new to Unity programming, so maybe Atmospheric Scattering means to be turned off intentionally.
Anyway, maybe it helps. Here is the full error message from the Logs:
NullReferenceException: Object reference not set to an instance of an object
TerraUnity.Runtime.AtmosphericScattering.OnWillRenderObject () (at Assets/TerraWorld/Graphics/Pro/Effects/Atmospheric Scattering/Code/AtmosphericScattering.cs:329)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Hi,
thanks for the fast reply. It may be related to my switch to universal render pipeline because I needed special effects on some of my game objects. I saw later, that TerraUnity does not support VFX with scripted render pipelines. Sorry, I'm pretty new to Unity programming, so maybe Atmospheric Scattering means to be turned off intentionally.
Anyway, maybe it helps. Here is the full error message from the Logs:
NullReferenceException: Object reference not set to an instance of an object
TerraUnity.Runtime.AtmosphericScattering.OnWillRenderObject () (at Assets/TerraWorld/Graphics/Pro/Effects/Atmospheric Scattering/Code/AtmosphericScattering.cs:329)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Quote from terraunity on February 26, 2022, 8:27 amDid you have a chance on getting further on the issue? For HDRP, URP or any other SRP templates, please use own Unity solutions for effects like atmospheric fog, volumetric lighting and...
Did you have a chance on getting further on the issue? For HDRP, URP or any other SRP templates, please use own Unity solutions for effects like atmospheric fog, volumetric lighting and...