Texture conversion problem

Hello!

I am currently implementing a plugin for a game written using Unreal Engine (version 3.5) and have encountered a problem:

Using the functions GSceneRenderTargets.GetRenderTargetTexture(SceneColor) located in SceneRendering.cpp I think I have accessed the primary render targets. The problem is that these render target textures are returned as a FTexture2DRHIRef texture, and I need them to be in DirectX form (ID3D11Texture2D).

I know Unreal turns both DX and GL textures into Texture2D to enable cross-platform use. But I need to do the reverse, to get a DirectX (or OpenGL) texture from a FTexture2DRHIRef.
I’ve looked for a method but found nothing so far, thus I now write to you for help.

If there is no direct way of conversion, some way to access the byte data of the FTexture2DRHIRef texture would also work.

Any tips at all would be most appreciated!