Created
June 3, 2019 05:36
-
-
Save sassembla/aa1f020dc1f093bc584128b375e5ce28 to your computer and use it in GitHub Desktop.
This file contains 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
[MenuItem("Window/TakeScreenshotWithCaptureScreenshotAsTexture")] | |
public static void Menu() | |
{ | |
var tex = ScreenCapture.CaptureScreenshotAsTexture(); | |
var jpgBytes = tex.EncodeToJPG(10);// 90KB | |
using (var sw = new StreamWriter("a.jpg")) | |
{ | |
sw.BaseStream.Write(jpgBytes, 0, jpgBytes.Length); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
limited: free aspect mode required.