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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
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