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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Windows] Special characters in file names are sorted to the end of the alphabet in the Project window
- Information box icons are not contained within the information box bounds in Render Pipeline Converter window
- Field is still marked as changed when changed back to its default state in UI Builder
- Crash on UnityEngine.UI.RawImage:OnPopulateMesh when playing Raw Image Texture animation with Sprite keyframes
- 32bit floating point RenderTexture blending feature is not available for WebGPU
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