> ## Documentation Index
> Fetch the complete documentation index at: https://dacruzdev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Single-Frame Screenshot Capture in ScreenshotKit

> Use ScreenshotCapture.Capture to take a single high-resolution screenshot from any Camera and retrieve the result in one synchronous call.

## Basic capture

```csharp theme={null}
using DaCruz.ScreenshotKit;
using UnityEngine;

public class CaptureNow : MonoBehaviour
{
    public Camera sourceCamera;
    public ScreenshotSettings settings;

    public void Capture()
    {
        var result = ScreenshotCapture.Capture(sourceCamera, settings);
        if (result.Success)
            Debug.Log($"Saved to {result.FilePath}");
        else
            Debug.LogError(result.ErrorMessage);
    }
}
```

`ScreenshotCapture.Capture` returns a `CaptureResult` with `Success`, `FilePath`, `ErrorMessage`, and `Texture` fields. The final resolution is `settings.width * settings.sizeMultiplier` by `settings.height * settings.sizeMultiplier`.

## One-line convenience wrapper

```csharp theme={null}
// Uses the active settings asset and Camera.main when arguments are omitted.
string path = ScreenshotKitAPI.CaptureScreenshot();

// Or pass your own:
string path2 = ScreenshotKitAPI.CaptureScreenshot(settings, sourceCamera);
```

`ScreenshotKitAPI.CaptureScreenshot` returns the saved file path, or `null` on failure. Call `ScreenshotKitAPI.SetRuntimeSettings(settings)` once to set the settings used when the argument is omitted.

## Batch from script

There is no dedicated batch API; loop your own cameras:

```csharp theme={null}
foreach (var cam in camerasToShoot)
    ScreenshotCapture.Capture(cam, settings);
```

## Panoramas from script

```csharp theme={null}
var result = PanoramaCapture.Capture(sourceCamera, settings);
```

The panorama layout, aim mode, cubemap face size, and output width all come from the `ScreenshotSettings` asset, matching the **Capture** tab's 360 Panorama section.

## See also

* [Transparent Capture](/api/transparent-capture) for alpha-channel output.
* [Capture with Mattes](/api/capture-with-mattes) for AOV passes alongside the beauty shot.
* [Runtime Component](/api/runtime-component) for a no-code hotkey in builds.
