> ## 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.

# The ScreenshotKitCapture Runtime Component

> Add the Screenshot Capture MonoBehaviour to any GameObject for hotkey-driven, no-code screenshots inside a built game.

`ScreenshotKitCapture` is a `MonoBehaviour` for no-code captures in builds. Add it via **Add Component > ScreenshotKit > Screenshot Capture**.

## Inspector fields

| Field                 | What it does                                                                                                            |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **Target Camera**     | Camera to capture. Defaults to `Camera.main` when empty.                                                                |
| **Settings**          | `ScreenshotSettings` asset to use. When empty, a Resources `ScreenshotKitSettings` asset is used, or built-in defaults. |
| **Capture On Hotkey** | Poll a hotkey each frame to capture.                                                                                    |
| **Hotkey**            | The key to poll (default `F12`), plus optional **Require Ctrl / Shift / Alt** modifiers.                                |

## From script

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

public class PhotoMode : MonoBehaviour
{
    public ScreenshotKitCapture capture;

    void Awake()
    {
        capture.OnCaptured += path => Debug.Log($"Saved {path}");
    }

    public void TakePhoto()
    {
        string path = capture.Capture();
    }
}
```

`Capture()` returns the saved file path, and `OnCaptured` fires with the same path after each successful capture (hotkey or scripted).

<Warning>
  The built-in hotkey needs the legacy Input Manager. On the new Input System, leave **Capture On Hotkey** off and call `Capture()` from your own input action instead.
</Warning>

## See also

* [Capture](/api/capture) for the static API this component wraps.
