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); } }
public void Capture() { SimpleScreenshotCapture.CaptureScreenToTexture(OnTextureCaptured); }
public void Capture() { m_RawImage.texture = SimpleScreenshotCapture.CaptureCameraToTexture(m_Width, m_Height, m_Camera); }