Search Issue Tracker
By Design
Votes
0
Found in [Package]
11.0.0
Issue ID
1226313
Regression
No
RenderTexture is silently released during project builds
How to reproduce:
1. Open the attached project named "render_texture_build_issue.zip"
2. Check if the Scene window is active and the Game window is hidden
3. Try building the project
Expected results: The project is built successfully
Actual results: "MissingReferenceException: The object of type 'RenderTexture' has been destroyed but you are still trying to access it." error is thrown
Reproducible with: 7.5.2(2019.4.16f1), 8.3.1(2020.1.17f1), 10.2.2(2020.2.1f1), 11.0.0(2021.1.0a10)
Could not test with: 2018.4(SRP was in early preview)
Notes:
1. The build is completed successfully despite the thrown errors
2. Reseting the Layout does not resolve the issue
3. If both Scene and Game windows are active, the issue does not occur
4. If both Scene and Game windows are hidden, the issue does not occur
5. Project is using a custom SRP
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
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
Resolution Note:
The issue could not be reproduced with the High Definition Render Pipeline template. The problem seems to originate from the custom SRP solution used in the project which was not considering a requirement when writing a custom SRP. HDRP is using GetTemporaryRT() and this will always return a valid RenderTexture. Maybe this requirement was not clear in the Documentation while the project's custom SRP solution was developed