HDRP Onwillrenderobject is called but camera is null

It seems OnWillRenderObject is called properly but camera is always null. Is it a bug?

Ok I need to know when something is visible in frustrum and when it becomes invisible. I used this to make sure I can still render this in the main camera but now i can’t differentiate between the cameras so it doesn’t help me anymore. Any suggestions?