I have some inconveniences because in UniversalRP, Camera.current returns null when calling it in OnWillRenderObject.
I hope Unity supports this.
I’ve sent the bug report to Unity and the response says “the issue is not a bug but rather a known limitation of the current implementation of this functionality”.
I want to create mirror reflection system. However I can’t render the results per camera because of this limitation.
In OnWillRenderObject’s document, It is said “Note that Camera.current will be set to the camera that will render the object.”.
There is the error in the document about OnWillRenderObject.
Strange that the documentation says this, all the MonoBehaviour OnXXX function won’t work in a SRP. Documentation isn’t exactly a strongpoint when it comes to SRP, so it likely just hasn’t been updated?
Alternatively, you can validate if the bounds of the object you want to check is within a certain camera’s frustrum to the same effect: