Capturing Screen through two cameras

Hi guys,

Anyone have suggestions on how to screenshot the game at runtime, with 2 cameras? I have one showing the main game and a second camera for the UI elements. Is there a way to composite the two at runtime into one screenshot PNG image?

Below is the code to get a screencapture from one camera, but I’m stumped on how to get it from 2 cameras.

Thanks for the help!

Texture2D _sShotTexture2d = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false);
_mainCamera.Render();
RenderTexture.active = _mainCamera.targetTexture;
_sShotTexture2d.ReadPixels(new Rect(0, 0, _sShotWidth, _sShotHeight), 0, 0);
byte[] _bytes = _sShotTexture2d.EncodeToPNG();
_fileNameString = SnapShotName();
System.IO.File.WriteAllBytes(_fileNameString, _bytes);

Can you use the ScreenCapture class instead?