Change screenshot method to TakeScreenshotAsync#270
Merged
nowsprinting merged 4 commits intomasterfrom Oct 22, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the screenshot capture mechanism to use Unity's newer async API when available, while maintaining backward compatibility with older Unity versions.
Key Changes:
- Migrated from
TakeScreenshottoTakeScreenshotAsyncfor Unity 2023.1+ - Deprecated obsolete screenshot options (
SuperSize,StereoCaptureMode) andGizmosconfig property - Removed tests for deprecated screenshot features
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Runtime/Monkey.cs | Added conditional compilation to use TakeScreenshotAsync for Unity 2023.1+, moved coroutine runner behind version guard |
| Runtime/OperationLogger.cs | Updated to use TakeScreenshotAsync with conditional compilation for Unity 2023.1+ |
| Runtime/ScreenshotOptions.cs | Marked SuperSize and StereoCaptureMode properties as obsolete |
| Runtime/MonkeyConfig.cs | Marked Gizmos property as obsolete and improved documentation |
| Tests/Runtime/MonkeyTest.cs | Removed tests for deprecated features, refactored test setup methods to static, cleaned up unused constants |
| Runtime/Operators/Utils/PointerClickEventSimulator.cs | Updated logger parameter documentation |
| Runtime/Operators/Utils/PointerDragEventSimulator.cs | Updated logger parameter documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Code Metrics Report
Details | | master (c9411e1) | #270 (6cc5285) | +/- |
|---------------------|------------------|----------------|-------|
- | Coverage | 85.1% | 85.0% | -0.1% |
| Files | 67 | 67 | 0 |
| Lines | 2260 | 2256 | -4 |
- | Covered | 1924 | 1919 | -5 |
- | Code to Test Ratio | 1:1.3 | 1:1.3 | -0.1 |
| Code | 4143 | 4161 | +18 |
- | Test | 5763 | 5723 | -40 |
- | Test Execution Time | 12m38s | 13m26s | +48s |Code coverage of files in pull request scope (93.6% → 93.3%)
Reported by octocov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before
ScreenshotHelper.TakeScreenshotmethod.After
ScreenshotHelper.TakeScreenshotAsyncmethod if Unity 2023.1 or newerSuperSizeandStereoCaptureModeinScreenshotOptionsGizmosinMonkeyConfig