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
- Shader Graph node settings warning text colour is very hard to read
- Inconsistent logic on when 'open VFX graph Samples' button appears on Visual Effect Graph in Package Manager
- Unable to dock tabs on panels when non-standard pointers are used (touch-screen, tablet and pen)
- Editor hangs when rendering TMP Text Component with Left and Right Margins set in the Extra Settings
- Occlusion's fields can be set to negative numbers
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.