Beispiel #1
0
    public byte[] WatsonScreenShot(CaptureScreenshot.ImageFormat imageFormat)
    {
        cam.cullingMask     = screenshotCullingMask;
        cam.clearFlags      = screenshotClearFlags;
        cam.backgroundColor = Color.black;

        var bytes = CaptureScreenshot.Capture(cam, imageFormat);

        cam.cullingMask     = defaultCullingMask;
        cam.clearFlags      = defaultClearFlags;
        cam.backgroundColor = defaultBackgroundColor;

        return(bytes);
    }
Beispiel #2
0
 public static string ScreenShotName(CaptureScreenshot.ImageFormat format)
 {
     return(Random.value + (format == CaptureScreenshot.ImageFormat.PNG ? ".png" : ".jpg"));
 }