Search Issue Tracker
By Design
By Design in 2023.2.X
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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
Resolution Note (2023.2.X):
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