Access DXGI Swapchain with DX11?

Hi, I’m the author of AVPro Movie Capture plugin for Unity, a plugin that captures Unity into AVI videos.

With OpenGL and DX9 we access the frame buffer directly to do this capturing, however with DX11 it seems we need access to the DXGI pointer to to get the current render target / swap chain. Does anyone know if it’s possible to acquire this?

Just from looking at the API, it appears you can do this by going through the DeviceContext. Given the ID3D11Device given to you by Unity you can use:

I haven’t yet written any code to do this, but I suspect something along this line could get you to a solution.

You can using Kiero for example, like many IMGui implementations for games that use DX11.