---
title: "Screenshots"
description: "Learn more about how to set up Sentry to take screenshots when an error occurs. The screenshot will be paired with the original event, giving you additional insight into issues."
url: https://docs.sentry.io/platforms/unreal/enriching-events/screenshots/
---

# Screenshots | Sentry for Unreal Engine

Sentry makes it possible to automatically take a screenshot and include it as an [attachment](https://docs.sentry.io/platforms/unreal/enriching-events/attachments.md) when a user experiences an error, an exception or a crash.

This feature is only available for SDKs with a user interface, like the ones for mobile and desktop applications. It's also limited by whether taking a screenshot is possible or not. For example, in some environments, like native iOS, taking a screenshot requires the UI thread, which often isn't available in the event of a crash. Another example where a screenshot might not be available is when the event happens before the screen starts to load. So inherently, this feature is a best effort solution.

## [Enabling Screenshots](https://docs.sentry.io/platforms/unreal/enriching-events/screenshots.md#enabling-screenshots)

Because screenshots may contain [PII](https://docs.sentry.io/platforms/unreal/data-management/sensitive-data.md), they are an opt-in feature. You can enable screenshots as shown below:

Using the editor menu in **Project Settings > Plugins > Sentry**:

Or, like so, if you're [configuring things programmatically](https://docs.sentry.io/platforms/unreal/configuration/options.md):

```cpp
USentrySettings* Settings = FSentryModule::Get().GetSettings();
Settings->AttachScreenshot = true;
```

On Android, screenshot attachments are only supported for ensure and assertion events.

## [Screenshot Capture Mechanism](https://docs.sentry.io/platforms/unreal/enriching-events/screenshots.md#screenshot-capture-mechanism)

Since the Unreal Engine SDK consists of multiple SDKs, the specific mechanism with which a screenshot is captured will vary depending on where the error originated.

* On Windows/Linux, errors from within your game will be captured using the Unreal Engine API. This means that screenshots will only contain what's visible within your game. Any overlays on top of your game won't be visible.
* On Mac/iOS, screenshots will be captured using platform APIs. If you're using a native plugin to display an overlay and an error occurs, the SDK will try to capture a screenshot that contains the overlay.

### [Out-of-Process Screenshot Capturing (Experimental)](https://docs.sentry.io/platforms/unreal/enriching-events/screenshots.md#out-of-process-screenshot-capturing-experimental)

On Windows, the default screenshot capture runs in-process using the Unreal Engine rendering pipeline. This means it depends on the Slate renderer being functional at the time of the crash, which may not always be the case.

As an alternative, you can enable **out-of-process screenshot capturing**, which delegates crash screenshot capture to the native SDK. Instead of relying on Unreal's rendering pipeline, this uses OS-level APIs (GDI+) from a separate process (the crashpad handler or native crash daemon), making it significantly more reliable during crashes.

To enable it, turn on the **Enable out-of-process screenshot capturing** option in **Project Settings > Plugins > Sentry > Attachments**, or set it programmatically:

```cpp
USentrySettings* Settings = FSentryModule::Get().GetSettings();
Settings->EnableOutOfProcessScreenshots = true;
```

This option requires `AttachScreenshot` to be enabled.

**Differences from the default mechanism:**

* Screenshots are captured from a separate process, so they work even when the game's rendering pipeline is broken at the time of the crash.
* The crashpad backend can capture screenshots for fast-fail crashes that bypass structured exception handling (SEH).
* Because the screenshot is captured using OS-level screen capture, it shows the game window as it appears on screen rather than the rendered frame buffer. If the game window is minimized or fully occluded by other windows, the screenshot may be empty or incomplete.
* This only affects crash screenshots. Non-fatal events (ensures, assertions) continue using the default Unreal Engine-based capture regardless of this setting.

**Screenshots may contain PII.** For example, if your game has a registration form and an error occurs while the form is being displayed.

## [Viewing Screenshots](https://docs.sentry.io/platforms/unreal/enriching-events/screenshots.md#viewing-screenshots)

Once you've clicked on the event ID of a specific issue, you'll be able to see an overview of all the attachments as well as associated events in the "Attachments" tab.
