Skip to content

UniStuttgart-VISUS/UnrealDesktopDuplication

Repository files navigation

Desktop Duplication for Unreal Engine

Exposes a desktop captured by the Desktop Duplication API as an Unreal texture.

Prerequisites

  • Platform: Win64
  • Unreal Engine 5.6+
    • Tested with Unreal Engine 5.6.1. May or may not work with previous versions.

Usage

  • Clone the repository into the "Plugins" directory of your project.
  • Restart Unreal Engine and check the plugin list for "Desktop Duplication for Unreal Engine 5".
  • The UDesktopDuplicator is the core class implementing all the stuff.
  • The BP_DesktopDuplicationActor in the plugin's content shows how to put everything together. It uses the RT_DesktopDuplication render target next to it as its destination.
  • You can create additional instances with different render targets to duplicate multiple screens. Use the Target property of the blueprint to set the display name you want to see, for instance "\.\DISPLAY0". If no display is configured, the first one found will be used.
  • The Timeout property of the blueprint will be passed to IDXGIOutputDuplication::AcquireNextFrame. A value of zero will check the availability of a new frame in a non-blocking manner. A value of -1 will block indefinitely until the next frame is available.
  • The UDesktopDuplicator has a property named AllowGpuCopy which allows direct texture to texture copies if the underlying RHI is Direct3D 11. The property has no effect if a different RHI is used.

About

Allows for using the Desktop Duplication API for dynamic textures in Unreal Engine 5.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published