Search Issue Tracker
By Design
Votes
0
Found in
2017.1.0f3
Issue ID
951830
Regression
No
Setting Camera.targetTexture to null makes its target object invisible
To reproduce:
1. Open attached Unity project "RTReplace.zip"
2. Open "0" scene
3. In the Hierarchy, navigate to Canvas --> RawImage
4. In RawImage Inspector, change Texture from RT1 to none
5. In the ChangeRT script of the Camera object, uncomment line saying "Camera.main.targetTexture = null;"
6. Go into Play mode
Expected result: RawImage should stay active and visible
Actual result: RawImage disappears instantly after starting Play mode and it is invisible in scene view too, despite that there is no place in the code that could trigger this behaviour (see attached gif "bug.gif")
Workaround: Making Camera.targetTexture wait a few frames until setting it to null does not reproduce the issue (see attached gif "nobug.gif")
Reproduced on: 5.6.3p3, 2017.1.1p2, 2017.2.0f1, 2017.3.0b1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Add comment