Search Issue Tracker
By Design
Votes
0
Found in
2017.3.0a1
2018.1.0a1
2018.2.0a1
2018.2.3f1
2018.3.0a1
2019.1.0a1
Issue ID
1077243
Regression
No
Calling AssetDatabase.Refresh after ScreenCapture.CaptureScreenshot does not import the captured screenshot
How to reproduce:
1. Open tester-submitted project (CaptureScreenshotAndRefresh)
2. Open Scene 'SampleScene'
3. Enter Play Mode and press 'O'
Expected result: the screenshot, taken via ScreenCapture.CaptureScreenshot appears in the Assets folder
Actual result: the screenshot, taken via ScreenCapture.CaptureScreenshot does not appear in the Assets folder
Reproducible with: 2017.4.14f1, 2018.1.9f2, 2018.2.16f1, 2018.3.0b10, 2019.1.0a9
Notes:
The screenshot is imported when the capturing and refreshing is performed in an IEnumerator coroutine with a yield return
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
- Incorrect Shader keyword activation for Shadows when no Light is present in URP
- Editor freezes when loading a specific AssetBundle
- WebGPU builds with Multithreading enabled crash on Safari
- Set as Value in UI Builder doesn't work across all properties.
- Reorderable ListView inside a ScrollView has a glitchy behavior when trying to reorder items
Resolution Note:
Currently this behaviour is By Design - the screenshot generation is done asynchronously in the background in order not to block the application. Adding a blocking version of the API is possible, though unlikely to happen in the short term (we are currently rewriting the asset database and we will only address new feature requests late next year). A coroutine approach makes sense as a workaround, as the user can wait for the file to be written to disk before calling Refresh.