Capturing camera views that are not currently active

There is a tutorial in the documentation to encode screen as a PNG texture. It shows how to capture a camera view as an Encoded PNG bytes.

The problem is I have multiple cameras in the scene which are not currently active. How do I obtain all the shots of the camera at the press of button without switching to individual camera first?

Since the cameras aren’t active, their contents don’t currently exist. In the link, what you see on the screen is what you would get. You would need to use GetTemporary, assign that texture to your inactive camera’s targetTexture property, and call the Render function. The texture can then be used to call ReadPixels in the same manner as the link above. Finally, call ReleaseTemporary.