void Update()
 {
     if (Input.GetKeyDown(m_ShortcutA))
     {
         // Capture the current screen at its current resolution, including UI
         SimpleScreenshotCapture.CaptureScreenToFile(m_FullpathA);
     }
     if (Input.GetKeyDown(m_ShortcutB))
     {
         // Capture the screen at a custom resolution using render to texture.
         // You must specify the list of cameras to be used in that mode.
         // Here we use Camera.main, the first scene camera tagged as "MainCamera"
         SimpleScreenshotCapture.CaptureCameraToFile(m_FullpathB, m_Width, m_Height, Camera.main, TextureExporter.ImageFileFormat.JPG, 70, 8);
     }
 }
Exemplo n.º 2
0
 public void Capture()
 {
     SimpleScreenshotCapture.CaptureScreenToTexture(OnTextureCaptured);
 }
Exemplo n.º 3
0
 public void Capture()
 {
     m_RawImage.texture = SimpleScreenshotCapture.CaptureCameraToTexture(m_Width, m_Height, m_Camera);
 }