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
- Crash on AudioMixer::GetFMODChannelGroup when entering Play Mode in a specific project
- Prefabs with "Flags" enum properties result in "IndexOutOfRangeException" when trying to commit/revert
- The Camera first person mode in Cameras overlay is greyed out and not clickable when the Editor is restarted with the Game View focused
- Scene View doesn't select the Canvas when it's clicked with the View Tool
- Transform fields are impossible to edit when Inspector window is resized
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.