Hi!
If I have field with class from Scene like: GameObject, Reflection Probe, etc., and I want to ckeck it on Null, I always get that it is not null, but it is not true.
private GameObject _testObject = null;
protected override void Execute(CustomPassContext ctx)
{
_testObject= null;
Debug.Log(_testObject != null); //Always True
Debug.Log(_testObject.name); //Always NullReferenceException
}
How can I solve this problem?
Thanks!
Edit: Unity 2022.1.10f1, HDRP 13.1.8