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
- Errors are logged when importing an asset at a path with Firebase
- Entering too big of a number in 2D Renderer Lightmode Tags freezes the Editor
- Crash on GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
Add comment