In UE4,there are so many people want to draw a staticmesh/skeletal mesh in a widget of UMG.
There are two solution I know:
- put the object in the world but
player can’t see.Use a scene capture
2D to render it to a render target
and use this as a texture to UMG.
That’s almost the only solution I
found in answerhub - I’m making plugin
in ue4, so I can use a Viewport
Client to create another world and
put objects into there to
render.Then display the result with
a SEditorViewport. But it only work
in Unreal Editor.
So I’m thinking about, can I render a object without put this into the world but directly render to a render target texture?(If I need to render many meshes , putting them in somewhere of world without seeing each other is too hard)
- First I know is there can only be one world in the game , so the viewport client solution can’t work.
- I don’t if there are any solution. Can I build a scene renderer directly and call RenderViewFamily_RenderThread?