0
\$\begingroup\$

I created a Render Texture named it : GUICameraRenderTexture

This is a screenshot of the Player camera : I assigned to the Target Texture the new GUICameraRenderTexture :

Player Camera

Then on the bottom of the hierarchy I have a Main Menu > Camera : The new Camera I changed the Clear Flags to Don't Clear and Culling Mask to Nothing :

GUI Camera under Main Menu

Then there is a Canvas the Canvas Render Mode is set to Screen Space - Overlay

And last the Raw Image I assigned to the Texture the GUICameraRenderTexture :

Rae Image

The problem is either in the editor mode or in runtime where the game is running if I disable the new GUI Camera the camera under Main Menu it give error that there is no cameras to render even if the Player camera is enabled.

I want to start the game with the Player camera and then on escape key to switch to the main menu gui camera.

Screenshot if I'm disabling the main menu gui camera :

No cameras to render

\$\endgroup\$
1
\$\begingroup\$

The second camera is the only one rendering to the screen. The "master camera" is rendering to a texture, which means that it will not render to the screen. If you want to allow the camera to render to the screen, you need to set the render texture target to null.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.