WindowCapture2D Usage

Procedures for displaying the captured image with WindowCapturePlane, WindowCaptureUMG, or CaptureMachine.

This page explains the three ways to display the captured image and their procedures. For plugin installation, see Setup.

The settings are common to the three methods. For details on target window selection and frame rate, see Capture Settings.

Place WindowCapturePlane in the level

This method displays the captured image on a plane in 3D space. You use the bundled WindowCapturePlane.

  1. Open the WindowCapture2D Content → PlaneActor folder in the Content Browser tree view and select WindowCapturePlane.
Selecting WindowCapturePlane in the Content Browser
  1. Drag WindowCapturePlane into the level and place it.
  2. In the placed Actor’s Properties, enter the title of the window you want to capture in Capture Target Title.
  3. Run Play In Editor. The captured image of the target window appears on the plane.

If the target window is not found, capture does not start and a Warning is printed to the Output Log. To review the title, see Capture Settings.

Place WindowCaptureUMG on a widget

This method displays the captured image as part of your UI. You place the bundled WindowCaptureUMG on a User Widget Blueprint.

  1. Open the User Widget Blueprint and place WindowCaptureUMG from the Palette.
Placing WindowCaptureUMG in UMG
  1. In the Properties of the placed WindowCaptureUMG, enter the title of the window you want to capture in Capture Target Title.
  2. When the widget is shown on screen, the captured image appears.

The settings are the same as for WindowCapturePlane.

Handle the texture directly with CaptureMachine

This method is for cases where you want to process the captured image yourself, such as swapping it into a material. You create a CaptureMachine object and receive the Texture2D through an event.

  1. In Blueprint, run Create Object (Class: CaptureMachine) and store the created object in a variable. The object is used until you stop capturing, so storing it in a variable is mandatory.
Blueprint example for obtaining a texture with CaptureMachine
  1. Set the window information of the capture target in the Properties of the CaptureMachine object.
  2. Call the Start method of the CaptureMachine object to start capturing.
  3. When the window is captured, the Change Texture event fires and you can obtain the Texture2D object.
  4. When you finish capturing, call the Dispose method.

WindowCapturePlane and WindowCaptureUMG are Blueprints that wrap this CaptureMachine operation. They create and destroy the object automatically, so use them in normal cases.

How to choose

Situation Recommendation
Display a screen in 3D space WindowCapturePlane
Embed a screen as part of your UI WindowCaptureUMG
Process the texture with a material Use CaptureMachine directly

Next steps

  • Check the title matching rules, monitor selection, trimming, and frame rate in Capture Settings.