I would like to render thumbnails of items for the inventory of our game. Can someone tell me what is the recommended way to implement this feature?
I already have a version with a FPreviewScene ( Preview World and Scene ) and a Capture2D Component that works without problems in PIE. To render the actor in the standalone build I had to use the flag UWorld::bHack_Force_UsesGameHiddenFlags_True, otherwise the primitive would not be added the scene because its a preview world and we are not in the editor anymore ( UPrimitiveComponent::ShouldComponentAddToScene() ). In the standalone build there is also a different behaviour for ticking the worlds, so I had to destroy the FPreviewScene immediately after rendering the image.
I can´t believe that its so complicated to render a separate scene into a rendertarget for usage in the UI, because its very easy to do so in the main world. I would like to use an own scene because there should be different Lightsources etc… The next thing I will try is to extract some code that is used to render the thumbnails in the editor, or can someone recommend a better approach?