Conversation
|
/review |
| // belongs to the Layout Viewer as much as to this window. | ||
| else if (!m_ScreenshotList.DoPreviewGUI(imageRect)) | ||
| { | ||
| var message = m_DeviceSelection.SelectedDevice == null |
There was a problem hiding this comment.
This no-device message is unreachable because OnGUI bypasses DoPreviewGUI whenever SelectedDevice is null. Consequently, disconnecting the last device hides the entire device-independent screenshot list, preventing users from viewing, exporting, renaming, or deleting saved captures. Continue rendering the screenshot list without a device and gate only capture/live-stream actions.
🤖 Helpful? 👍/👎
| var process = new System.Diagnostics.Process(); | ||
| var si = process.StartInfo; | ||
| si.WorkingDirectory = projectDirectory; | ||
| si.FileName = windows ? Path.Combine(projectDirectory, "gradlew.bat") : "sh"; |
There was a problem hiding this comment.
On Windows this assigns a .bat file directly to ProcessStartInfo.FileName while UseShellExecute is false. That path uses CreateProcess, which cannot execute batch files directly, so the offered “Build the server jar” action fails with a Win32Exception. Launch the wrapper through cmd.exe /c on Windows.
🤖 Helpful? 👍/👎
| private IEnumerator WaitForMoreFrames(string what, int framesBefore, int count) | ||
| { | ||
| return WaitForCondition(what, | ||
| () => Runtime.LiveStream.FramesReceived > framesBefore + count, |
There was a problem hiding this comment.
This reverts commit 609e9f2.
Type of change:
Description
The main logcat window is not affected by this change, only screen capture window is affected
Video
You can now watch the device's screen live in the Screen Capture window, and click, scroll and type into it from the Editor.
Also, it's not accessible via Window->Analysis->Android Screen Capture
Capturing needs something on the device: External/UnityLogcatServer is a small Gradle project that builds a 17 KB jar, run through app_process as the shell user. It mirrors a display into an ImageReader, JPEG-encodes each frame and writes it over an abstract socket that adb forward exposes. Frames are only produced when the screen changes, so an idle device costs almost nothing.
Input travels back up the same socket: touch, scroll wheel, keys (through the device's own keyboard layout), and Ctrl/Cmd + A, C, V for select-all/copy/paste on the device. Back / Home / Overview buttons sit beside the image, which is the only way in on gesture-navigation devices.
The window was reorganised around it. Screenshots used to overwrite one file in Temp; they're now kept in Library/AndroidLogcat/Screenshots and listed down the left, with the live view as the first row — arrow keys to cycle, F2 rename, Del delete, right-click for Show In Explorer / Open / Save As, Reconnect on the Live row, Ctrl+Shift+S to capture. The window also opens from Window > Analysis > Android Screen Capture. Stream size, JPEG quality and frame rate cap are in Preferences > Analysis > Android Logcat Settings.
Improved screenshot window
Settings
Checklist for PR maker
Testing status
Devices:
Testing checklist