File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Assets/Plugins/WebGL/WebBridge Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -302,15 +302,15 @@ public void CheckOnlineStatus()
302302 [ WebCommand ( Description = "Save current screen as PNG" ) ]
303303 public void SaveScreenshot ( )
304304 {
305- SaveScreenshot ( 1 ) ;
305+ SaveScreenshotSuperSize ( 1 ) ;
306306 }
307307
308308 /// <summary>
309309 /// Captures the current screen and saves it as a PNG file.
310310 /// </summary>
311311 /// <param name="superSize">1 for normal size, 2 for double size, 4 for quadruple size</param>
312312 [ WebCommand ( Description = "Save current screen as PNG with variable super size" ) ]
313- public void SaveScreenshot ( int superSize )
313+ public void SaveScreenshotSuperSize ( int superSize )
314314 {
315315 StartCoroutine ( CaptureScreenshot ( superSize ) ) ;
316316 }
@@ -324,7 +324,7 @@ private IEnumerator CaptureScreenshot(int superSize)
324324 try
325325 {
326326 // Capture the screen
327- var screenshot = ScreenCapture . CaptureScreenshotAsTexture ( superSize ) ;
327+ Texture2D screenshot = ScreenCapture . CaptureScreenshotAsTexture ( superSize ) ;
328328
329329 try
330330 {
@@ -334,7 +334,7 @@ private IEnumerator CaptureScreenshot(int superSize)
334334 // Download through browser
335335 WebToolPlugins . DownloadBinaryFile ( filename , pngData , "image/png" ) ;
336336
337- Debug . Log ( $ "Screenshot saved as { filename } ") ;
337+ Debug . Log ( $ "Screenshot saved as { filename } ( { screenshot . width } x { screenshot . height } ) with size { pngData . Length } bytes ") ;
338338 }
339339 finally
340340 {
You can’t perform that action at this time.
0 commit comments