Search Issue Tracker

By Design

Votes

0

Found in

2021.3.22f1

2022.2.13f1

2023.1.0b10

2023.2.0a7

Issue ID

UUM-32803

Regression

Yes

The overlay camera does not capture RenderTexture when rendering to screen

--

-

Reproduction steps:
1. Open the attached project “CameraNoImage“
2. Enter The Play Mode
3. Select “UI“ GameObject in the Hierarchy window
4. Click on the “Capture“ checkbox of “Capture Camera Render Texture“ in the Inspector window

Expected result: Game view is captured and is displayed on the “RawImage“ GameObject
Actual result: Nothing is displayed

Reproducible with: 2021.2.0a16, 2021.3.22f1, 2022.2.13f1, 2023.1.0b10, 2023.2.0a7
Not reproducible with: 2020.3.46f1, 2021.2.0a15

Reproducible on: Windows10

  1. Resolution Note:

    Overlay cameras do not write to target textures, that only applies to base cameras, the overlay cameras then write on top of the base camera target texture, so rendering the UI to the overlay camera and expecting to access the frame results by referencing the overlay camera target texture is wrong usage. This used to work before 21.3 because it was a bug/undefined behaviour, which was fixed in that version.

    The correct way to make this scene work as intended is to:
    - change the UI camera to base camera
    - change the priority to 1 so it is rendered after the base camera

    the Capture script should now work correctly

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.