Download

Display URenderTargetTexture2D in editor viewport HUD

Hi all,
I’m developing a Plugin, in my plugin I spawn a SceneCaptureComponent2D and render to a UTextureRenderTarget2D (all created via c++).
Now I would like to see what’s inside. If I use the editor, found my SceneCaptureComponent2D and click on the little thumbnail, I only see a big checkboard (meanwhile the thumbnail seems correct)… so I’ve started my journey trying to clearly visualize what’s inside… I’ve tried using DrawTexture but seems that method can only be invoked within a AHUD class… so I’ve created a subclass of AHUD, but I don’t know how to use it. Seems that spawn it is not sufficient, in fact its DrawHUD is not invoked nor its Tick method.

Can anyone help me please? If someone knows any techniques to display that texture, please let me know.