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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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.