Howto render camera into texture while still rendering into scene view?

I’m writing an editor script and I want to include a preview of the current camera while still displaying the main scene view. I can do the preview fine, with a render texture, however when I render into this RT it removes the camera from the main scene preview.

Is there a way to render into a RT while still displaying the camera view in the main scene?

I’m sure I can duplicate the camera and settings to accomplish this, but not sure if an easier way exists.

Any thoughts on how to go about this?

Solved by setting the camera target texture to null right after rendering it:

		mainCamera.targetTexture = renderTexture; = renderTexture; 


		screenTexture.ReadPixels( new Rect(0, 0, width , height ), 0, 0 );
		screenTexture.Apply(false); = null;

		mainCamera.targetTexture = null;