Exposes a desktop captured by the Desktop Duplication API as an Unreal texture.
- Platform: Win64
- Unreal Engine 5.6+
- Tested with Unreal Engine 5.6.1. May or may not work with previous versions.
- 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
UDesktopDuplicatoris the core class implementing all the stuff. - The
BP_DesktopDuplicationActorin the plugin's content shows how to put everything together. It uses theRT_DesktopDuplicationrender target next to it as its destination. - You can create additional instances with different render targets to duplicate multiple screens. Use the
Targetproperty 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
Timeoutproperty of the blueprint will be passed toIDXGIOutputDuplication::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
UDesktopDuplicatorhas a property namedAllowGpuCopywhich allows direct texture to texture copies if the underlying RHI is Direct3D 11. The property has no effect if a different RHI is used.
